drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilooner <...@git.apache.org>
Subject [GitHub] drill pull request #984: DRILL-5783 Made a unit test for generated Priority ...
Date Wed, 01 Nov 2017 21:48:57 GMT
Github user ilooner commented on a diff in the pull request:

    https://github.com/apache/drill/pull/984#discussion_r148394268
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/xsort/TestExternalSort.java
---
    @@ -138,34 +141,34 @@ public void testNewColumnsManaged() throws Exception {
         testNewColumns(false);
       }
     
    -
       @Test
       public void testNewColumnsLegacy() throws Exception {
         testNewColumns(true);
       }
     
       private void testNewColumns(boolean testLegacy) throws Exception {
         final int record_count = 10000;
    -    String dfs_temp = getDfsTestTmpSchemaLocation();
    -    System.out.println(dfs_temp);
    -    File table_dir = new File(dfs_temp, "newColumns");
    -    table_dir.mkdir();
    -    try (BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(new
File(table_dir, "a.json")))) {
    -      String format = "{ a : %d, b : %d }%n";
    -      for (int i = 0; i <= record_count; i += 2) {
    -        os.write(String.format(format, i, i).getBytes());
    -      }
    +    final String tableDirName = "newColumns";
    +
    +    TableFileBuilder tableA = new TableFileBuilder(Lists.newArrayList("a", "b"), Lists.newArrayList("%d",
"%d"));
    --- End diff --
    
    I've made the JsonFileBuilder, which takes a RowSet and writes it out to a file as json.


---

Mime
View raw message