-
Notifications
You must be signed in to change notification settings - Fork 4
refactor(csharp): make CloudFetch pipeline protocol-agnostic #14
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
Conversation
8ef2139 to
ecb98f7
Compare
| var request = new ExecuteStatementRequest | ||
| { | ||
| Statement = sqlQuery, | ||
| WaitTimeout = enableDirect ? null : "10s" // ← null means wait until complete |
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.
I am not seeing null as a valid WaitTimeout? https://docs.databricks.com/api/workspace/statementexecution/executestatement
Also this should probably map to disposition? https://docs.databricks.com/api/workspace/statementexecution/executestatement#disposition
In the SEA wiki it says if we assign inline but result is larger than 25MB it will fail. And for EXTERNAL_LINK there is also an upper limit of 100GB.
I think in order for SEA to work like thrift, we may need a 3rd option like AUTO, which just like thrift directResult capability, it will return either inline result or cloudfetch links automatically depending on the result data size.
eric-wang-1990
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.
I think overall it looks good to me, can we run this against all the tests to make sure no regression is introduced?
Also it's better if we can hold off this until we migrate all the existing PRs that is include in the arrow-adbc branch but not this driver branch, there are a handful of them like ~5ish
| // Default values | ||
| private const int DefaultParallelDownloads = 3; | ||
| private const int DefaultPrefetchCount = 2; | ||
| private const int DefaultMemoryBufferSizeMB = 200; |
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.
This was changed in one of existing PR: #45
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.
int DefaultMemoryBufferSizeMB = 100; need change it to 100
2d7d1ae to
53a4273
Compare
53a4273 to
3c3ebde
Compare
3c3ebde to
1416c44
Compare
1416c44 to
8a178e4
Compare
8a178e4 to
08d12ed
Compare
08d12ed to
0d65328
Compare
| // Default values | ||
| private const int DefaultParallelDownloads = 3; | ||
| private const int DefaultPrefetchCount = 2; | ||
| private const int DefaultMemoryBufferSizeMB = 200; |
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.
int DefaultMemoryBufferSizeMB = 100; need change it to 100
0d65328 to
b5001fd
Compare
b5001fd to
7dd0465
Compare
7dd0465 to
73ed0ec
Compare
|
|
||
| // IActivityTracer implementation - delegates to statement | ||
| ActivityTrace IActivityTracer.Trace => _statement.Trace; | ||
| // IActivityTracer implementation - delegates to statement (or returns lazy-initialized fallback if null) |
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.
How does this work? Is this for SEA?
For SEA does the activityTrace propogate successfully? If we need a follow up item can we add a TODO
73ed0ec to
0fed090
Compare
squash and merge refactor
0fed090 to
2900917
Compare
🥞 Stacked PR
Use this link to review incremental changes.
Make the CloudFetch pipeline protocol-agnostic to support both Thrift and REST API implementations, enabling code reuse and easier addition of new protocols in the future.
Changes:
Created BaseResultFetcher abstract class extracting common fetching logic
Refactored CloudFetchResultFetcher to extend BaseResultFetcher
Made IDownloadResult protocol-agnostic
Enhanced CloudFetchDownloader to support custom HTTP headers
Benefits: