-
Notifications
You must be signed in to change notification settings - Fork 132
chore(csharp/src/Drivers/Apache): Cleanup HiveServer2-based code with shared Thrift request/response interfaces #2797
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
base: main
Are you sure you want to change the base?
Conversation
@birschick-bq and @jadewang-db, it would be great if you could take a look at this cleanup and see whether it makes sense -- as well as run the test cases to make sure that it hasn't broken anything. |
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.
maybe a better file name?
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.
ah, you are trying to get unify the code of direct result.
|
||
namespace Apache.Hive.Service.Rpc.Thrift | ||
{ | ||
internal interface IRequest |
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.
what is the purpose of add the request and response interface?
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.
Semantically, it's to abstract away a class of messages where you make a request and either get the results immediately in the response or you get a handle that lets you poll until such results are available.
Mechanically, it's to eliminate a bunch of unsightly helpers.
@@ -40,7 +40,7 @@ | |||
namespace Apache.Hive.Service.Rpc.Thrift | |||
{ | |||
|
|||
internal partial class TExecuteStatementReq : TBase | |||
internal partial class TExecuteStatementReq : TBase, IRequest |
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.
making changes inline may cause later update the thrift file harder, maybe use a separate file to do this by leveraging the partial class syntax?
I think it's probably possible to simplify the code further in terms of processing either the direct result or do the polling, but didn't want to change the structure too much in one PR. |
No description provided.