You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:52:19 UTC

[GitHub] [drill] luocooong commented on a change in pull request #2327: DRILL-8005: Add Writer to JDBC Storage Plugin

luocooong commented on a change in pull request #2327:
URL: https://github.com/apache/drill/pull/2327#discussion_r730233364



##########
File path: contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcWriterWithH2.java
##########
@@ -370,22 +372,73 @@ public void testWithArrayField() throws Exception {
     }
   }
 
+  @Test
+  public void testWithLargeFile() throws Exception {
+    String query = "CREATE TABLE h2.tmp.`drill_h2_test`.`t2` (id,first_name,last_name,email,gender,ip_address) AS " +
+      "SELECT id,first_name,last_name,email,gender,ip_address FROM cp.`csv/large_csv.csvh`";
+    QuerySummary insertResults = queryBuilder().sql(query).run();
+    assertTrue(insertResults.succeeded());
+
+    query = "SELECT COUNT(*) FROM h2.tmp.`drill_h2_test`.`t2`";
+    long rowCount = queryBuilder().sql(query).singletonLong();
+    assertEquals(6000, rowCount);
+
+    // Now drop the table
+    String dropQuery = "DROP TABLE h2.tmp.`drill_h2_test`.`t2`";
+    QuerySummary dropResults = queryBuilder().sql(dropQuery).run();
+    assertTrue(dropResults.succeeded());
+  }
+
+  @Test
+  @Ignore("This is a slow test.  Please run manually.")

Review comment:
       Thanks for the explanation.

##########
File path: contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcWriterWithPostgres.java
##########
@@ -210,6 +216,40 @@ public void testWithLargeFile() throws Exception {
     assertTrue(dropResults.succeeded());
   }
 
+  @Test
+  @Ignore("This is a slow test.  Please run manually.")
+  public void testWithReallyLongFile() throws Exception {
+    Path generatedFile = null;
+    try {
+      generatedFile = JdbcTestUtils.generateCsvFile("csv/very_large_file.csvh", 10, 100000);

Review comment:
       As an option, can we compress the csvh file to tar.gz format then read it ? Just to reduce the size of code base.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org