dongjoon-hyun commented on a change in pull request #29303:
URL: https://github.com/apache/spark/pull/29303#discussion_r464803567
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerWithSparkContextSuite.scala
##########
@@ -101,6 +104,135 @@ trait ThriftServerWithSparkContextSuite extends
SharedThriftServer {
}
}
}
+
+ test("check results from get columns operation from thrift server") {
+ val schemaName = "default"
+ val tableName = "spark_get_col_operation"
+ val schema = new StructType()
+ .add("c0", "boolean", nullable = false, "0")
+ .add("c1", "tinyint", nullable = true, "1")
+ .add("c2", "smallint", nullable = false, "2")
+ .add("c3", "int", nullable = true, "3")
+ .add("c4", "long", nullable = false, "4")
+ .add("c5", "float", nullable = true, "5")
+ .add("c6", "double", nullable = false, "6")
+ .add("c7", "decimal(38, 20)", nullable = true, "7")
+ .add("c8", "decimal(10, 2)", nullable = false, "8")
+ .add("c9", "string", nullable = true, "9")
+ .add("c10", "array<long>", nullable = false, "10")
+ .add("c11", "array<string>", nullable = true, "11")
+ .add("c12", "map<smallint, tinyint>", nullable = false, "12")
+ .add("c13", "date", nullable = true, "13")
+ .add("c14", "timestamp", nullable = false, "14")
+ .add("c15", "struct<X: bigint,Y: double>", nullable = true, "15")
+ .add("c16", "binary", nullable = false, "16")
+
+ val ddl =
+ s"""
+ |CREATE TABLE $schemaName.$tableName (
+ | ${schema.toDDL}
+ |)
+ |using parquet""".stripMargin
+
+ withCLIServiceClient { client =>
+ val sessionHandle = client.openSession(user, "")
+ val confOverlay = new java.util.HashMap[java.lang.String,
java.lang.String]
+ val opHandle = client.executeStatement(sessionHandle, ddl, confOverlay)
+ var status = client.getOperationStatus(opHandle)
+ while (!status.getState.isTerminal) {
+ Thread.sleep(10)
+ status = client.getOperationStatus(opHandle)
+ }
+ val getCol = client.getColumns(sessionHandle, "", schemaName, tableName,
null)
Review comment:
Ya. It seems that Hive 2.3 is affected. And, JDK11 maven seems not
running those test suite.
Do we have a follow-up idea, @yaooqinn and @cloud-fan ?
The error message is clear, `java.lang.ClassCastException`. If there is no
idea, I'd like to recommend to revert first and pass Maven Jenkins properly.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]