Skip to content

Commit

Permalink
feat: support get_option for local-rel threshold (#65)
Browse files Browse the repository at this point in the history
SparkConnect's Scala client currently fails for spark.createDataFrame()
requests
with a `NotImplementedError`.

The Scala client for this API submits a request to `"get_option"` with 
key `"localRelationCacheThreshold"`. 
We only support ConfigRequests for this key if `"op_type"`  is `"get"`. 

fixes #61

Co-authored-by: pat70 <[email protected]>
  • Loading branch information
pat70 and pat70 authored Aug 3, 2024
1 parent 07d3661 commit a6e0673
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gateway/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ def Config(self, request, context):
for key in request.operation.get_option.keys:
if key == 'spark.sql.session.timeZone':
response.pairs.add(key=key, value='UTC')
elif key in ['spark.sql.session.localRelationCacheThreshold',
'spark.sql.repl.eagerEval.maxNumRows']:
response.pairs.add(key=key, value='9999')
else:
_LOGGER.info(f'Unknown config item: {key}')
raise NotImplementedError(f'Unknown config item: {key}')
Expand Down

0 comments on commit a6e0673

Please sign in to comment.