[GitHub] [carbondata] QiangCai commented on a change in pull request #3409: [CARBONDATA-3544] cli support summary statistics for all columns

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] QiangCai commented on a change in pull request #3409: [CARBONDATA-3544] cli support summary statistics for all columns

GitBox
QiangCai commented on a change in pull request #3409: [CARBONDATA-3544] cli support summary statistics for all columns
URL: https://github.com/apache/carbondata/pull/3409#discussion_r333846070
 
 

 ##########
 File path: tools/cli/src/test/java/org/apache/carbondata/tool/CarbonCliTest.java
 ##########
 @@ -260,6 +264,31 @@ public void testSummaryPageMeta() {
     Assert.assertTrue(output.contains(expectedOutput));
   }
 
+  @Test
+  public void testSummaryAllColumns() {
+    String[] args = { "-cmd", "summary", "-p", path, "-C" };
+    ByteArrayOutputStream out = new ByteArrayOutputStream();
+    PrintStream stream = new PrintStream(out);
+    CarbonCli.run(args, stream);
+    String output = new String(out.toByteArray());
+    System.out.println(output);
+    Assert.assertTrue(output.contains("Block  Blocklet  Column Name  Meta Size  Data Size"));
+  }
+
+  @Test
+  public void testSummaryAllColumnsForOneFile() {
+    CarbonFile folder = FileFactory.getCarbonFile(path);
+    CarbonFile[] carbonFiles =
+        folder.listFiles(file -> file.getName().endsWith(CarbonTablePath.CARBON_DATA_EXT));
+    String[] args = { "-cmd", "summary", "-p", carbonFiles[0].getCanonicalPath(), "-C" };
+    ByteArrayOutputStream out = new ByteArrayOutputStream();
+    PrintStream stream = new PrintStream(out);
+    CarbonCli.run(args, stream);
+    String output = new String(out.toByteArray());
+    System.out.println(output);
 
 Review comment:
   removed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services