zhouyifan279 opened a new pull request, #5480:
URL: https://github.com/apache/kyuubi/pull/5480

   ### _Why are the changes needed?_
   When using Kyuubi Hive JDBC to Hive Server2, 
TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 is used and can not be changed.
   
   When we connected to Hive Server2 with version lower than 2.2.0, we got the 
following error:
   ```
   org.apache.kyuubi.shade.org.apache.thrift.TApplicationException: 
   Required field 'client_protocol' is unset! 
   Struct:TOpenSessionReq(client_protocol:null, 
configuration:{kyuubi.client.version=1.7.3, 
set:hiveconf:hive.server2.thrift.resultset.default.fetch.size=1000, 
kyuubi.client.ipAddress=172.16.19.113, use:database=default})
   ```
   
   In this PR, we introduced a session conf `clientProtocolVersion`. 
   By adding `clientProtocolVersion=8` to jdbc url, the error got fixed.
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
   
   - [x] Manual tests against Hive Server2 version 2.1.1-cdh6.3.0
   
   - [x] [Run 
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
 locally before make a pull request
   
   
   ### _Was this patch authored or co-authored using generative AI tooling?_
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to