wangyum commented on a change in pull request #25228:
[SPARK-28472][SQL][TEST][test-hadoop3.2] Add test for thriftserver protocol
versions
URL: https://github.com/apache/spark/pull/25228#discussion_r307568768
##########
File path:
sql/hive-thriftserver/v1.2.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala
##########
@@ -46,4 +49,13 @@ private[thriftserver] object ThriftserverShimUtils {
private[thriftserver] def toJavaSQLType(s: String): Int =
Type.getType(s).toJavaSQLType
+ private[thriftserver] val testedProtocalVersions = Seq(
Review comment:
Two options:
1. `HIVE_CLI_SERVICE_PROTOCOL_V3` -> `HIVE_CLI_SERVICE_PROTOCOL_V8` because
we support [Hive
0.12](https://github.com/apache/hive/blob/release-0.12.0/service/if/TCLIService.thrift#L47).
2. `HIVE_CLI_SERVICE_PROTOCOL_V1` -> `HIVE_CLI_SERVICE_PROTOCOL_V8`. Like
Hive, lower versions of the client can always connect to a higher version of
ThriftServer. e.g. [Hive
0.11](https://github.com/apache/hive/blob/release-0.11.0/service/if/TCLIService.thrift#L41)
still can connect to Hive 3.1's ThriftServer without any warning:
```shell
[root@spark-3267648 hive-0.11.0-bin]# bin/beeline -u
jdbc:hive2://localhost:10000/default
scan complete in 3ms
Connecting to jdbc:hive2://localhost:10000/default
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/usr/lib/hadoop-2.7.7/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/root/hive-0.11.0-bin/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Connected to: Hive (version 3.1.1)
Driver: Hive (version 0.11.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 0.11.0 by Apache Hive
0: jdbc:hive2://localhost:10000/default> select 1;
+------+
| _c0 |
+------+
| 1 |
+------+
1 row selected (0.291 seconds)
```
I'd prefer option 2.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]