-
Notifications
You must be signed in to change notification settings - Fork 478
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-799216 Allow nextset without fetching result for async multistat… #1526
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1526 +/- ##
==========================================
+ Coverage 82.10% 82.17% +0.06%
==========================================
Files 61 61
Lines 8622 8638 +16
Branches 1274 1279 +5
==========================================
+ Hits 7079 7098 +19
+ Misses 1207 1206 -1
+ Partials 336 334 -2
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
else: | ||
assert cur.fetchall() == check | ||
savedIds.append(cur.sfqid) | ||
if not skip_to_last_set or index == len(checks) - 1: |
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.
I don't think that we should be skipping the last check
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.
We are not skipping the last check. We are doing the check if we are testing all sets, or if it is the last set.
…ement Description Prior to this change we are not able to call nextset before fetching result if the cursor executes an async multistatement query. The main reason is that we need to first wait the result by invoking _prefetch_hook, but in the async case, we will first call reset(), which clears the _prefetch_hook. This way _prefetch_hook will never be invoked and this causes failure in the connector. This fix adds a _prefetch_hook invoke before calling reset() Testing integ test
c4d3247
to
a9b47c8
Compare
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.
🚢 🚢
…ement
Description
Prior to this change we are not able to call nextset before fetching result if the cursor executes an async multistatement query. The main reason is that we need to first wait the result by invoking _prefetch_hook, but in the async case, we will first call reset(), which clears the _prefetch_hook. This way _prefetch_hook will never be invoked and this causes failure in the connector.
This fix adds a _prefetch_hook invoke before calling reset()
Testing
integ test
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-799216
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Prior to this change we are not able to call nextset before fetching result if the cursor executes an async multistatement query. The main reason is that we need to first wait the result by invoking _prefetch_hook, but in the async case, we will first call reset(), which clears the _prefetch_hook. This way _prefetch_hook will never be invoked and this causes failure in the connector.
This fix adds a _prefetch_hook invoke before calling reset()