-
Notifications
You must be signed in to change notification settings - Fork 173
feat(csharp/src/Drivers/Databricks): Fix for older DBR versions incorrect ResultFormat #3020
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/Databricks): Fix for older DBR versions incorrect ResultFormat #3020
Conversation
886f1db to
41ebff4
Compare
e85ddab to
65584da
Compare
4984bcb to
5544441
Compare
CurtHagenlocher
left a comment
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.
Thanks! Just a few small things.
| // Process direct results first, if available | ||
| if (_statement.HasDirectResults && _statement.DirectResults?.ResultSet?.Results?.ResultLinks?.Count > 0) | ||
| if (_statement.HasDirectResults && _statement.DirectResults?.ResultSet?.Results?.ResultLinks?.Count > 0 || | ||
| (_initialResults?.Results?.ResultLinks?.Count > 0)) |
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.
nit: fix indentation
| /// </summary> | ||
| public sealed class DatabricksCompositeReader : TracingReader | ||
| { | ||
|
|
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.
nit: remove extra blank line
|
|
||
| public override Schema Schema { get { return _schema; } } | ||
|
|
||
|
|
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.
nit: remove extra blank line
| /// A composite reader for Databricks that delegates to either CloudFetchReader or DatabricksReader | ||
| /// based on CloudFetch configuration and result set characteristics. | ||
| /// </summary> | ||
| public sealed class DatabricksCompositeReader : TracingReader |
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.
| public sealed class DatabricksCompositeReader : TracingReader | |
| internal sealed class DatabricksCompositeReader : TracingReader |
5544441 to
ce1d237
Compare
This is because there is a bug on runtime-side:
This PR gets around that by directly inspecting the results. Since we do not always have DirectResults, we make an additional FetchResult call to determine whether to use
CloudFetchReaderor arrow-basedDatabricksReader. Only if the result contains links does it decide to useCloudFetchReader.This test does not pass in 11.3, 10.4 DBR until this commit.
dotnet test --filter "FullyQualifiedName~LZ4DecompressionCapabilityTest"
Remaining work:
Remaining work: need to update status polling to start earlier, ideally should be managed by new DatabricksCompositeReader