Skip to content

Commit

Permalink
[compute] Ignore cluster obj when type is direct
Browse files Browse the repository at this point in the history
Cluster type is direct when there is no separate cluster/compute
configured and the queries are supposed to go through the hive/impala
specified in the connector request object.

Change-Id: I52c0ad97774c569cc41109c95f5334506c6b1386
  • Loading branch information
amitsrivastava committed Oct 16, 2023
1 parent 490c154 commit 3caac56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion desktop/libs/notebook/src/notebook/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,11 @@ def describe(request, database, table=None, column=None):
response = {'status': -1, 'message': ''}
notebook = json.loads(request.POST.get('notebook', '{}'))
source_type = request.POST.get('source_type', '')
connector = json.loads(request.POST.get('connector', '{}'))
cluster = json.loads(request.POST.get('cluster', '{}'))
connector = cluster if cluster else json.loads(request.POST.get('connector', '{}'))
if cluster and cluster.get('type') != 'direct':
connector = cluster

compute = json.loads(request.POST.get('compute', '{}'))

snippet = {'type': source_type, 'connector': connector, 'compute': compute}
Expand Down

0 comments on commit 3caac56

Please sign in to comment.