fixer-m / snowflake-db-net-client

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

Long running queries not returning results #15

Closed manish-kotecha-cko closed 2 years ago

manish-kotecha-cko commented 3 years ago

Hey, we've been having issues with long running queries not being executed properly. According to the snowflake docs if a query takes longer than 45 seconds to execute you will have a QueryStatus object returned with a different response code instead of the result but it seems as though this scenario is not being considered. https://docs.snowflake.com/en/developer-guide/sql-api/guide.html#handling-the-response

fixer-m commented 2 years ago

@manish-kotecha-cko, Hi! Thanks for reporting this and sorry for a long-waited answer. Unfortunately I've been too busy at work lately. I can't say when I will resume my active work on this client (but I hope for next 2-3 months). I think long running queries definitely should be supported by this client, so I'll make it my next higher priority feature. Not sure though how I can make it without API breaking changes.

manish-kotecha-cko commented 2 years ago

Hey Ilya, no worries and thanks for the nice project. In terms of avoiding breaking changes I think perhaps just checking the response code and retrying in a loop if it's gives the alternative response code and returning the result if there is the result response code? I think there is a similar implementation in Snowflake.Data client.

fixer-m commented 2 years ago

@manish-kotecha-cko Hi!

Yep, it turns out that implementation for this is really really simple - thanks for this hint :) Not sure why I thought that this will require API breaking changes.

So I've just released new version 0.3.9 that can handle long-running queries.