Skip to content

Commit 01fbc21

Browse files
use ClientProtocolI64 (#97)
Our thrift server does not actually honour ClientProtocol. We have to use ClientProtocolI64. Signed-off-by: Andre Furlan <[email protected]>
1 parent 39dbe07 commit 01fbc21

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

connector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
3636
if err != nil {
3737
return nil, wrapErr(err, "error initializing thrift client")
3838
}
39-
39+
protocolVersion := int64(c.cfg.ThriftProtocolVersion)
4040
session, err := tclient.OpenSession(ctx, &cli_service.TOpenSessionReq{
41-
ClientProtocol: c.cfg.ThriftProtocolVersion,
42-
Configuration: make(map[string]string),
41+
ClientProtocolI64: &protocolVersion,
42+
Configuration: make(map[string]string),
4343
InitialNamespace: &cli_service.TNamespace{
4444
CatalogName: catalogName,
4545
SchemaName: schemaName,

testdata/OpenSessionSuccess.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"status": {
33
"statusCode": "SUCCESS_STATUS"
44
},
5-
"serverProtocolVersion": "SPARK_CLI_SERVICE_PROTOCOL_V2",
5+
"serverProtocolVersion": "SPARK_CLI_SERVICE_PROTOCOL_V6",
66
"sessionHandle": {
77
"sessionId": {
88
"guid": "Ae1mneMGHoSo6JW/won/xg==",

0 commit comments

Comments
 (0)