yaooqinn commented on a change in pull request #29539:
URL: https://github.com/apache/spark/pull/29539#discussion_r478260644



##########
File path: 
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala
##########
@@ -686,6 +686,23 @@ class HiveThriftBinaryServerSuite extends 
HiveThriftJdbcTest {
     }
   }
 
+  test("Query Intervals in VIEWs through thrift server") {
+    val viewName1 = "view_interval_1"
+    val viewName2 = "view_interval_2"
+    val ddl1 = s"CREATE GLOBAL TEMP VIEW $viewName1 AS SELECT INTERVAL 1 DAY 
AS i"
+    val ddl2 = s"CREATE TEMP VIEW $viewName2 as select * from 
global_temp.$viewName1"
+    withJdbcStatement(viewName1, viewName2) { statement =>
+      statement.executeQuery(ddl1)
+      statement.executeQuery(ddl2)
+      val rs = statement.executeQuery(s"SELECT v1.i as a, v2.i as b FROM 
global_temp.$viewName1" +

Review comment:
       The ResultSetMetadata is used by the client-side user to do the right 
work on the result set what they get,when the interval values become strings, 
they need to follow the rules of String operations.
   
   The GetColumnOperation tells the client-side users about how the data is 
stored and formed at the server-side, then if the JDBC-users know column A is 
an interval type, then they should notice that they can not perform string 
functions, comparators, etc on column A.




----------------------------------------------------------------
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]

Reply via email to