HyukjinKwon commented on a change in pull request #33393: URL: https://github.com/apache/spark/pull/33393#discussion_r672725321
########## File path: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala ########## @@ -660,4 +660,29 @@ class SparkMetadataOperationSuite extends HiveThriftServer2TestBase { assert(!metaData.supportsRefCursors) } } + + test("SPARK-36179: get column operation support TIMESTAMP_[N|L]TZ") { + val t = "t_ltz_ntz" + // TODO: (SPARK-36180) add hive table here too + val ddl = s"CREATE GLOBAL TEMP VIEW $t as SELECT TIMESTAMP_LTZ '2018-11-17 13:33:33.000'" + + s" as c0, TIMESTAMP_NTZ '2018-11-17 13:33:33.000' as c1" + withJdbcStatement(t) { statement => + statement.execute(ddl) + val md = statement.getConnection.getMetaData + val rowSet = md.getColumns(null, "global_temp", t, "%") + + var idx = 0 + while (rowSet.next()) { + assert(rowSet.getString("COLUMN_NAME") === "c" + idx) + assert(rowSet.getInt("DATA_TYPE") === java.sql.Types.TIMESTAMP) + assert(rowSet.getString("TYPE_NAME") === "TIMESTAMP" + "_NTZ" * idx) Review comment: ```suggestion assert(rowSet.getString("TYPE_NAME") === "TIMESTAMP" + ("_NTZ" * idx)) ``` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org