-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat(csharp/src/Drivers/Apache/Spark): implement async overrides for Spark driver #1830
feat(csharp/src/Drivers/Apache/Spark): implement async overrides for Spark driver #1830
Conversation
{ | ||
TGetOperationStatusResp? statusResponse = null; | ||
do | ||
{ | ||
if (statusResponse != null) { Thread.Sleep(500); } | ||
if (statusResponse != null) { await Task.Delay(500); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, but it would be nice if this were configurable via a statement option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, created class properties to hold the value. Will add an implementation of the AdbcStatement.SetOption
in a future PR.
public override QueryResult ExecuteQuery() => ExecuteQueryAsync().AsTask().Result; | ||
|
||
public override UpdateResult ExecuteUpdate() => ExecuteUpdateAsync().Result; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these implementations (and the one in ImpalaStatement) move into the base class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the implementations of ExecuteQuery
, ExecuteUpdate
, ExecuteQueryAsync
and ExecuteUpdateAsync
to the base class.
} | ||
*/ | ||
} | ||
|
||
public override IArrowArrayStream GetInfo(IReadOnlyList<AdbcInfoCode> codes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to need to close the session on the Spark side or the resources will remain in use. Please file a followup bug for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, if you're referring to the removed Dispose
, there is a correct implementation of the Dispose
in the base class HiveServer2Statement
.
Implements asynchronous overrides for the Spark driver.