aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java
diff options
context:
space:
mode:
Diffstat (limited to 'exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java')
-rw-r--r--exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java
index 78f76d363..fb41df5e1 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestNestedLoopJoin.java
@@ -409,4 +409,30 @@ public class TestNestedLoopJoin extends JoinTestBase {
setSessionOption(ExecConstants.SLICE_TARGET, 100000);
}
}
+
+ @Test
+ public void testNlJoinWithStringsInCondition() throws Exception {
+ try {
+ test(DISABLE_NLJ_SCALAR);
+ test(DISABLE_JOIN_OPTIMIZATION);
+
+ final String query =
+ "select v.employee_id\n" +
+ "from cp.`employee.json` v\n" +
+ "left outer join cp.`employee.json` s\n" +
+ "on v.employee_id <> s.employee_id\n" +
+ "and (v.position_id <= '-1' or s.department_id > '5000')\n" +
+ "order by v.employee_id limit 1";
+
+ testBuilder()
+ .sqlQuery(query)
+ .unOrdered()
+ .baselineColumns("employee_id")
+ .baselineValues(1L)
+ .go();
+ } finally {
+ resetJoinOptions();
+ test(RESET_JOIN_OPTIMIZATION);
+ }
+ }
}