drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [3/6] drill git commit: DRILL-4277: Fix for JdbcPrel serialization issue.
Date Wed, 20 Jan 2016 15:31:11 GMT
DRILL-4277: Fix for JdbcPrel serialization issue.

This closes #326.


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

Branch: refs/heads/master
Commit: 664d34e3c64c3b52e1ed6347cab9ea27a4722a28
Parents: 43414e1
Author: Jacques Nadeau <jacques@apache.org>
Authored: Fri Jan 15 11:45:29 2016 -0800
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Wed Jan 20 07:30:00 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/store/jdbc/JdbcPrel.java     | 3 ++-
 .../drill/exec/store/jdbc/TestJdbcPluginWithDerbyIT.java    | 9 +++++++++
 .../storage-jdbc/src/test/resources/jdbcmulti/file1.json    | 1 +
 .../storage-jdbc/src/test/resources/jdbcmulti/file2.json    | 1 +
 4 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/664d34e3/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcPrel.java
----------------------------------------------------------------------
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 2433fbd..22894c9 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

http://git-wip-us.apache.org/repos/asf/drill/blob/664d34e3/contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithDerbyIT.java
----------------------------------------------------------------------
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 021ed66..6d59cfe 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.

http://git-wip-us.apache.org/repos/asf/drill/blob/664d34e3/contrib/storage-jdbc/src/test/resources/jdbcmulti/file1.json
----------------------------------------------------------------------
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 0000000..28752fa
--- /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

http://git-wip-us.apache.org/repos/asf/drill/blob/664d34e3/contrib/storage-jdbc/src/test/resources/jdbcmulti/file2.json
----------------------------------------------------------------------
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 0000000..7cd6c4a
--- /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


Mime
View raw message