Skip to content
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-817091: Async execution #887

Merged
merged 48 commits into from
Mar 26, 2024
Merged

Conversation

sfc-gh-ext-simba-lf
Copy link
Collaborator

Description

  • Adds the option to execute queries in async mode
  • Adds the capability to asynchronously wait for the query to finish and get the results using the query ID
  • Adds checking the query status
  • Adds checking if query is still running or encountered an error

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-ext-simba-lf sfc-gh-ext-simba-lf marked this pull request as ready for review March 12, 2024 16:16
@sfc-gh-ext-simba-lf sfc-gh-ext-simba-lf requested a review from a team as a code owner March 12, 2024 16:16
Snowflake.Data/Client/SnowflakeDbCommand.cs Outdated Show resolved Hide resolved
Snowflake.Data/Client/SnowflakeDbCommand.cs Outdated Show resolved Hide resolved
Snowflake.Data/Client/SnowflakeDbCommand.cs Show resolved Hide resolved
Snowflake.Data/Client/SnowflakeDbCommand.cs Show resolved Hide resolved
Snowflake.Data/Client/SnowflakeDbCommand.cs Outdated Show resolved Hide resolved
Snowflake.Data/Core/SFStatement.cs Outdated Show resolved Hide resolved
Snowflake.Data/Core/SFStatement.cs Outdated Show resolved Hide resolved
Snowflake.Data/Core/SFStatement.cs Show resolved Hide resolved
Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs Outdated Show resolved Hide resolved
Snowflake.Data.Tests/IntegrationTests/SFDbCommandIT.cs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 79.59184% with 60 lines in your changes are missing coverage. Please review.

Project coverage is 84.28%. Comparing base (8fa5df5) to head (91f9ac8).

Files Patch % Lines
Snowflake.Data/Core/SFStatement.cs 62.65% 52 Missing and 7 partials ⚠️
Snowflake.Data/Core/QueryResultsAwaiter.cs 98.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #887      +/-   ##
==========================================
+ Coverage   84.23%   84.28%   +0.05%     
==========================================
  Files          88       89       +1     
  Lines        9402     9649     +247     
  Branches      884      912      +28     
==========================================
+ Hits         7920     8133     +213     
- Misses       1251     1282      +31     
- Partials      231      234       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sfc-gh-knozderko sfc-gh-knozderko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But first fix all the comments.

@sfc-gh-ext-simba-lf
Copy link
Collaborator Author

I added utility functions IsStillRunning and IsAnError to SnowflakeDbConnection for parity with other connectors: https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-api#is_still_running

@sfc-gh-ext-simba-lf sfc-gh-ext-simba-lf merged commit 5aec6b4 into master Mar 26, 2024
21 of 22 checks passed
@sfc-gh-ext-simba-lf sfc-gh-ext-simba-lf deleted the SNOW-817091-Async-Execution branch March 26, 2024 01:01
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants