diff options
Diffstat (limited to 'contrib/storage-jdbc/src')
4 files changed, 13 insertions, 1 deletions
diff --git a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java index 2433fbd3d..22894c932 100644 --- a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java +++ b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java @@ -80,7 +80,8 @@ public class JdbcPrel extends AbstractRelNode implements Prel { @Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { - return new JdbcGroupScan(sql, convention.getPlugin(), rows); + JdbcGroupScan output = new JdbcGroupScan(sql, convention.getPlugin(), rows); + return creator.addMetadata(this, output); } @Override diff --git a/contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithDerbyIT.java b/contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithDerbyIT.java index 021ed665d..6d59cfe7c 100644 --- a/contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithDerbyIT.java +++ b/contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithDerbyIT.java @@ -32,6 +32,15 @@ import static org.junit.Assert.assertEquals; public class TestJdbcPluginWithDerbyIT extends PlanTestBase { @Test + public void testCrossSourceMultiFragmentJoin() throws Exception { + testNoResult("USE derby"); + testNoResult("SET `planner.slice_target` = 1"); + String query = "select x.person_id, y.salary from DRILL_DERBY_TEST.PERSON x " + + "join dfs.`${WORKING_PATH}/src/test/resources/jdbcmulti/` y on x.person_id = y.person_id "; + test(query); + } + + @Test public void validateResult() throws Exception { // Skip date, time, and timestamp types since derby mangles these due to improper timezone support. diff --git a/contrib/storage-jdbc/src/test/resources/jdbcmulti/file1.json b/contrib/storage-jdbc/src/test/resources/jdbcmulti/file1.json new file mode 100644 index 000000000..28752fabc --- /dev/null +++ b/contrib/storage-jdbc/src/test/resources/jdbcmulti/file1.json @@ -0,0 +1 @@ +{person_id: 1, salary: 10}
\ No newline at end of file diff --git a/contrib/storage-jdbc/src/test/resources/jdbcmulti/file2.json b/contrib/storage-jdbc/src/test/resources/jdbcmulti/file2.json new file mode 100644 index 000000000..7cd6c4a5e --- /dev/null +++ b/contrib/storage-jdbc/src/test/resources/jdbcmulti/file2.json @@ -0,0 +1 @@ +{person_id: 2, salary: 20}
\ No newline at end of file |