fixer-m / snowflake-db-net-client

Snowflake .NET Client
Apache License 2.0
51 stars 14 forks source link

Combining RowSet and chunks sometimes there are rowsets as well as chunks #27

Closed PeterDRasmussen closed 1 year ago

PeterDRasmussen commented 1 year ago

I found a weird issue today as not all the rows I selected from snowflake was returned. When I ran the query directly in the snowflake worksheet everything was fine. It seemed like it was missing half a chunk or so. I was able to reproduce the error as seen below from a debug session:

Snowflake-client-rowset-issue

It seems that sometimes not all the data is contained within the chunks, some rows are returned by the initial response as part of RowSet. To get all the rows I had to combine the data from the chunks along with the data inside RowSet (see the blue dots). My region "eu-north-1" was also missing in GetCloudTagByRegion and I could not get the integration tests to run without adding a warehouse in IntegrationTestBase.

Note: It seems that on subsequent requests all the rows are within chunks, but you can try and change the selectCount in the tests to provoke it.

Let me know what you think!

PeterDRasmussen commented 1 year ago

Oh and it is likely related to "Chunk going missing #24"

PeterDRasmussen commented 1 year ago

@fixer-m is there any chance you can look at this in the near future? I think this bug makes the client difficult to use.

fixer-m commented 1 year ago

@PeterDRasmussen Wow, this is really good catch - thank you! Never thought that it could return rows in chunks AND in a rowset at the same time. I'm gonna merge this fix and release new package version soon.

PeterDRasmussen commented 1 year ago

@fixer-m I find it super odd as well, Thank you!

PeterDRasmussen commented 1 year ago

@fixer-m Do you know when you will have time to publish a new version? As mentioned, I also think this fixes the open issue #24

fixer-m commented 1 year ago

@PeterDRasmussen I have just pushed new package version to NuGet. Thanks!