- Notifications
You must be signed in to change notification settings - Fork126
Fix : Unable to poll results in async API#515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
src/databricks/sql/thrift_backend.py Outdated
| # For async operation we don't want the direct results | ||
| getDirectResults=ttypes.TSparkGetDirectResults( | ||
| maxRows=max_rows,maxBytes=max_bytes | ||
| maxRows=0ifasync_opelsemax_rows, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Instead of setting maxRows as 0, I would recommend not specifying the direct result object in the request altogether. This is to make the intention clear of not expecting the direct results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Have made the object None
| getDirectResults=None | ||
| ifasync_op | ||
| elsettypes.TSparkGetDirectResults( | ||
| maxRows=max_rows, | ||
| maxBytes=max_bytes, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
do we have a linter for python driver yet? if not, could you please open an issue to community or internally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@jayantsing-db I can raise a new PR for that
| withself.cursor()ascursor: | ||
| whileduration<min_duration: | ||
| assertscale_factor<512,"Detected infinite loop" | ||
| assertscale_factor<1024,"Detected infinite loop" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you explain this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For long running queries the previous upper limit of scale factor was not sufficient to run queries for atleast 5 minutes, hence increased it
fb3e32c intorelease/v3.7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Description
Polling using the async API returned the
RESOURCE_NOT_FOUNDerror for async executed queriesFix
Force retention of data on the server side by not returning the results in the
direct resultswithin theexecute_queryresponseTesting
Added e2e tests