-
Notifications
You must be signed in to change notification settings - Fork 126
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
#993 Causes ambiguous error to be thrown when result is nil #996
Comments
we'll check this one too - thank you for raising the separate issue ! |
Hello @madisonchamberlain ! First thing - it's great that you found a bug before it was even released! That saves us some problems :) Second - I found the solution to the error that you presented when no data is returned. It was definitely my oversight in the mentioned PR. Fix: #998 Third thing - why do you use |
@sfc-gh-pfus thank you for the quick fix that was fast! We are using
then we loop calling |
It answers the question about using About query returning parameters - I checked it. Are you sure it worked before? I checked out the commit before my changes (c962655), prepared the test which calls Also, let's consider - what should happen, when we want to retrieve native arrow batches, but the response is JSON - should we create arrow data in driver? That doesn't make sense. |
Yeah, it was working before. I have a unit test suite that runs on every pr which is currently on commit |
Ok just added this test #1000 |
Thanks @madisonchamberlain ! I ran the code you provided on the top of the commit c962655 (before any related changes were made) and it passed green, but it doesn't confirm that it worked ;) The problem is that this line:
is never reached, because arrow batches are empty. Add a condition |
Yes I am convinced thank you! I am curious what the recommended solution is here if there is one. I don't see any way to get the json response from off the rows object. If I hit this case I could rerun the query with |
You mean you want to receive raw JSON data, to pass it somewhere forward without deserializing, do I understand you correctly? Currently it is not available I'm afraid, we deserialize data and forget original response to free memory. |
Ok good to know thank you! |
Hi @madisonchamberlain ! Can we close the issue now? |
marking this one as closed for now as it seems to be sorted, but if there's still further questions please feel free to comment and we can reopen. |
Yes, thank you for closing! |
Hey there, I am looking for a fix for this as well, but #993 seems to have released a pretty significant bug when using the
WithArrowBatches
flag. I know its not released on the current version but ideally I wanted to help fix this before it is released. When Igo get github.com/snowflakedb/gosnowflake@a4c355786334df0624c003ad6068ff4281cdf975
all queries which would previously return no arrow chunks are now failing witharrow/ipc: could not read message schema: arrow/ipc: could not read continuation indicator: EOF
I understand that this may have been there under the hood the entire time, but previously we were still able to get results and since this isnt a snowflake error, we cant explicitly check for it and re-run the query without arrow batch. This is the code I am running. The issue is that there is no way for us to know if the query will return an empty response until we run it, and this should return with no error.a basic query which breaks this would be
select 0 where 1 = 0
go get github.com/snowflakedb/gosnowflake@cf94c15207719b43ac8199d7d183e69b9f70d4ea fixes the problem.
Another query which previously worked and does not work anymore is
``SHOW PARAMETERS LIKE 'TIMEZONE'`
The error is thrown at
rows, err = queryer.QueryContext(gosnowflake.WithArrowBatches(ctx), query.Sql(), nil)
, not when I call fetchThe text was updated successfully, but these errors were encountered: