drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [7/8] drill git commit: DRILL-4331: Fix TestFlattenPlanning.testFlattenPlanningAvoidUnnecessaryProject test for Java8
Date Tue, 09 Feb 2016 00:26:58 GMT
DRILL-4331: Fix TestFlattenPlanning.testFlattenPlanningAvoidUnnecessaryProject test for Java8

Test TestFlattenPlanning.testFlattenPlanningAvoidUnnecessaryProject fails with Java8
because of Map order differences between Java7 and Java8. Test now checks for both
options.

Closes #351


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/32da4675
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/32da4675
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/32da4675

Branch: refs/heads/master
Commit: 32da4675e8bf1358b863532daadd2769f380600f
Parents: fbb0165
Author: Laurent Goujon <laurent@dremio.com>
Authored: Mon Feb 1 11:06:01 2016 -0800
Committer: Jason Altekruse <altekrusejason@gmail.com>
Committed: Mon Feb 8 14:56:16 2016 -0800

----------------------------------------------------------------------
 .../drill/exec/physical/impl/flatten/TestFlattenPlanning.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/32da4675/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/flatten/TestFlattenPlanning.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/flatten/TestFlattenPlanning.java
b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/flatten/TestFlattenPlanning.java
index a6e4786..f32eaaa 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/flatten/TestFlattenPlanning.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/flatten/TestFlattenPlanning.java
@@ -24,8 +24,11 @@ public class TestFlattenPlanning extends PlanTestBase {
 
   @Test
   public void testFlattenPlanningAvoidUnnecessaryProject() throws Exception {
-    testPlanSubstrPatterns("select flatten(complex), rownum from cp.`/store/json/test_flatten_mappify2.json`",
-        new String[]{"Project(EXPR$0=[$1], rownum=[$0])"}, new String[]{"Project(EXPR$0=[$0],
EXPR$1=[$1], EXPR$3=[$1])"});
+    // Because of Java7 vs Java8 map ordering differences, we check for both cases
+    // See DRILL-4331 for details
+    testPlanMatchingPatterns("select flatten(complex), rownum from cp.`/store/json/test_flatten_mappify2.json`",
+        new String[]{"\\QProject(EXPR$0=[$1], rownum=[$0])\\E|\\QProject(EXPR$0=[$0], rownum=[$1])\\E"},
+        new String[]{"\\QProject(EXPR$0=[$0], EXPR$1=[$1], EXPR$3=[$1])\\E|\\QProject(EXPR$0=[$1],
EXPR$1=[$0], EXPR$3=[$0])\\E"});
   }
 
   @Test // DRILL-4121 : push partial filter past projects.


Mime
View raw message