-
Notifications
You must be signed in to change notification settings - Fork 36
[PECOBLR-314] add thrift protocol version handling #292
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
lib/DBSQLSession.ts
Outdated
this.context.getLogger().log(LogLevel.debug, `Session created with id: ${this.id}`); | ||
if (this.serverProtocolVersion) { |
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. can we always log even if the serverProtocolVersion
is not defined, this helps us to know if it is defined or not.
lib/DBSQLSession.ts
Outdated
@@ -453,13 +499,17 @@ export default class DBSQLSession implements IDBSQLSession { | |||
await this.failIfClosed(); | |||
const driver = await this.context.getDriver(); | |||
const clientConfig = this.context.getConfig(); | |||
|
|||
// Set runAsync only if supported by protocol version | |||
const runAsync = ProtocolVersion.supportsAsyncMetadataOperations(this.serverProtocolVersion) ? true : undefined; |
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: there are a few const runAsync = ProtocolVersion.supportsAsyncMetadataOperations(this.serverProtocolVersion) ? true : undefined;
can we wrap it in a single function so that you can change the default value true
and undefined
in a single place.
Description
Add thrift version handling for driver support.
based on protocol features list in runtime thrift server. [Link](based on https://github.com/databricks-eng/runtime-dev/blob/3e59d727aa67cec8add4f53d326467304c62b078/sql/hive-thriftserver/if/TCLIService.thrift#L40)
Testing
unit tests
e2e test