paul-rogers commented on a change in pull request #1940: DRILL-7406: Update 
Calcite to 1.21.0
URL: https://github.com/apache/drill/pull/1940#discussion_r361894195
 
 

 ##########
 File path: 
contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/complex_types/TestHiveStructs.java
 ##########
 @@ -476,4 +476,25 @@ public void strWithUnionField() throws Exception {
         .baselineValues(2, mapOf("n", 5, "u", "Text"))
         .go();
   }
+
+  @Test // DRILL-7386
+  public void countStructColumn() throws Exception {
+    testBuilder()
+        .sqlQuery("SELECT COUNT(str_n0) cnt FROM hive.struct_tbl")
+        .unOrdered()
+        .baselineColumns("cnt")
+        .baselineValues(3L)
+        .go();
+  }
+
+  @Test // DRILL-7386
+  public void typeOfFunctions() throws Exception {
+    testBuilder()
+        .sqlQuery("SELECT sqlTypeOf(%1$s) sto, typeOf(%1$s) to, modeOf(%1$s) 
mo, drillTypeOf(%1$s) dto " +
+            "FROM hive.struct_tbl LIMIT 1", "str_n0")
+        .unOrdered()
+        .baselineColumns("sto", "to", "mo", "dto")
+        .baselineValues("STRUCT", "MAP", "NOT NULL", "MAP")
 
 Review comment:
   Should we test this for more than a single case?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to