drill icon indicating copy to clipboard operation
drill copied to clipboard

DRILL-7722: Add reproducer unit test

Open bozzzzo opened this issue 4 years ago • 1 comments

DRILL-7722: Add reproducer unit test

Description

Add a unit test that demonstrates that a view with UNNEST cannot be sucessfully queried.

Documentation

Fixing the bug will make documentation as-is correct

Testing

The added test fails.

A slightly modified test that does not use the view, but directly executes the view query, passes:

$ git diff
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestViewSupport.java b/exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestViewSupport.java
index 1a92e192f..7c317f427 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestViewSupport.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestViewSupport.java
@@ -857,7 +857,8 @@ public class TestViewSupport extends TestBaseViewSupport {
         DFS_TMP_SCHEMA,
         null,
         viewSQL,
-        "SELECT * FROM TEST_SCHEMA.TEST_VIEW_NAME LIMIT 4",
+        //"SELECT * FROM TEST_SCHEMA.TEST_VIEW_NAME LIMIT 4",
+        viewSQL + " LIMIT 4",
         baselineColumns("customer_id", "order_id"),
         baselineRows(row(1.0,  1.0),
                      row(1.0,  2.0),

bozzzzo avatar May 27 '20 14:05 bozzzzo

The test fails in the same way as already reported in JIRA https://github.com/apache/drill/runs/715619115?check_suite_focus=true#step:6:10828

bozzzzo avatar May 28 '20 06:05 bozzzzo

The underlying issue was fixed in https://github.com/apache/drill/pull/2602.

cgivre avatar Feb 09 '23 01:02 cgivre