You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/01/21 11:08:22 UTC

[GitHub] vvysotskyi commented on a change in pull request #1614: DRILL-6962: Function coalesce returns an Error when none of the columns in coalesce exist in a parquet file

vvysotskyi commented on a change in pull request #1614: DRILL-6962: Function coalesce returns an Error when none of the columns in coalesce exist in a parquet file
URL: https://github.com/apache/drill/pull/1614#discussion_r249406319
 
 

 ##########
 File path: exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestCastFunctions.java
 ##########
 @@ -749,4 +749,21 @@ public void testCastTimeLiteralInFilter() throws Exception {
       run("drop table if exists dfs.tmp.test_time_filter");
     }
   }
+
+  @Test
+  public void testCastUntypedNull() throws Exception {
+    String[] types = new String[] {
+        "BOOLEAN", "INT", "BIGINT", "FLOAT", "DOUBLE", "DATE", "TIME", "TIMESTAMP", "INTERVAL MONTH",
+        "INTERVAL YEAR", "VARBINARY", "VARCHAR", "DECIMAL(9)", "DECIMAL(18)", "DECIMAL(28)", "DECIMAL(38)"
+    };
+    String query = "select cast(coalesce(unk1, unk2) as %s) as coal from cp.`tpch/nation.parquet` limit 1";
+    for (String type : types) {
+      testBuilder()
+          .sqlQuery(String.format(query, type))
+          .unOrdered()
 
 Review comment:
   baselineTypes()

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services