Skip to content

Conversation

@sfc-gh-dszmolka
Copy link
Contributor

Description

Currently, we consider BLOCKED querystatus as an Error; which is a weird divergence from other Snowflake drivers, which consider it still Running.

Some examples:

On the other hand, Go, Node.js, and libsnowflakeclient (= ODBC) drivers doesn't consider it as Running, so we might want to fix those too - or, make JDBC and Python consider BLOCKED as Error, to stop the drivers being divergent on this.
Traditionally, I think JDBC came first and perhaps the weird implementation which led to this divergence.

Anyhow. The definition of BLOCKED status:

The state when a statement is waiting on a lock on resource held by another statement.

which by definition, if it's waiting on something, then it's still running and not in an end state.

Checklist

  • Code compiles correctly
  • Code is formatted according to Coding Conventions
  • Created tests which fail without the change (if possible)
  • All tests passing (dotnet test)
  • Extended the README / documentation, if necessary
  • Provide JIRA issue id (if possible) or GitHub issue id in PR name

@sfc-gh-snowflakedb-snyk-sa
Copy link
Contributor

sfc-gh-snowflakedb-snyk-sa commented May 8, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@codecov
Copy link

codecov bot commented May 19, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
3101 2 3099 108
View the top 3 failed test(s) by shortest run time
Snowflake.Data.Tests.UnitTests.SFStatementTest::TestIsStillRunning(Blocked,False)
Stack Traces | 0.002s run time
at Snowflake.Data.Tests.UnitTests.SFStatementTest.TestIsStillRunning(QueryStatus status, Boolean expectedResult) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data.Tests\UnitTests\SFStatementTest.cs:line 172

1)    at Snowflake.Data.Tests.UnitTests.SFStatementTest.TestIsStillRunning(QueryStatus status, Boolean expectedResult) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data.Tests\UnitTests\SFStatementTest.cs:line 172
Snowflake.Data.Tests.UnitTests.SFStatementTest::TestIsAnError(Blocked,True)
Stack Traces | 0.014s run time
at Snowflake.Data.Tests.UnitTests.SFStatementTest.TestIsAnError(QueryStatus status, Boolean expectedResult) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data.Tests\UnitTests\SFStatementTest.cs:line 191

1)    at Snowflake.Data.Tests.UnitTests.SFStatementTest.TestIsAnError(QueryStatus status, Boolean expectedResult) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data.Tests\UnitTests\SFStatementTest.cs:line 191
Snowflake.Data.Tests.IntegrationTests.SFDbCommandIT::TestPutArrayBindAsyncMultiThreading
Stack Traces | 6.58s run time
--TearDown
   at Snowflake.Data.Core.SFStatement.ExecuteHelper[T,U](Int32 timeout, String sql, Dictionary`2 bindings, Boolean describeOnly, Boolean asyncExec) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data\Core\SFStatement.cs:line 715
   at Snowflake.Data.Core.SFStatement.ExecuteSqlOtherThanPutGet(Int32 timeout, String sql, Dictionary`2 bindings, Boolean describeOnly, Boolean asyncExec) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data\Core\SFStatement.cs:line 568
   at Snowflake.Data.Core.SFStatement.Execute(Int32 timeout, String sql, Dictionary`2 bindings, Boolean describeOnly, Boolean asyncExec) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data\Core\SFStatement.cs:line 468
   at Snowflake.Data.Client.SnowflakeDbCommand.ExecuteInternal(Boolean describeOnly, Boolean asyncExec) in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data\Client\SnowflakeDbCommand.cs:line 453
   at Snowflake.Data.Client.SnowflakeDbCommand.ExecuteNonQuery() in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data\Client\SnowflakeDbCommand.cs:line 165
   at Snowflake.Data.Tests.SFBaseTestAsync.RemoveTables() in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data.Tests\SFBaseTest.cs:line 102
   at Snowflake.Data.Tests.SFBaseTestAsync.AfterTest() in D:\a\snowflake-connector-net\snowflake-connector-net\Snowflake.Data.Tests\SFBaseTest.cs:line 85

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants