parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject parquet-mr git commit: PARQUET-327. Show statistics in the dump output.
Date Thu, 21 Apr 2016 03:59:28 GMT
Repository: parquet-mr
Updated Branches:
  refs/heads/master 36ce032b6 -> 741944332


PARQUET-327. Show statistics in the dump output.

Closes #237


Project: http://git-wip-us.apache.org/repos/asf/parquet-mr/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-mr/commit/74194433
Tree: http://git-wip-us.apache.org/repos/asf/parquet-mr/tree/74194433
Diff: http://git-wip-us.apache.org/repos/asf/parquet-mr/diff/74194433

Branch: refs/heads/master
Commit: 741944332d5bd90112b610a8b5f2eeefe51e08bc
Parents: 36ce032
Author: Tom White <tom@cloudera.com>
Authored: Tue Jul 7 16:55:32 2015 +0100
Committer: Ryan Blue <blue@apache.org>
Committed: Wed Apr 20 20:58:40 2016 -0700

----------------------------------------------------------------------
 .../org/apache/parquet/tools/command/DumpCommand.java  | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/74194433/parquet-tools/src/main/java/org/apache/parquet/tools/command/DumpCommand.java
----------------------------------------------------------------------
diff --git a/parquet-tools/src/main/java/org/apache/parquet/tools/command/DumpCommand.java
b/parquet-tools/src/main/java/org/apache/parquet/tools/command/DumpCommand.java
index 94d5002..6d5e106 100644
--- a/parquet-tools/src/main/java/org/apache/parquet/tools/command/DumpCommand.java
+++ b/parquet-tools/src/main/java/org/apache/parquet/tools/command/DumpCommand.java
@@ -48,6 +48,7 @@ import org.apache.parquet.column.page.DictionaryPage;
 import org.apache.parquet.column.page.PageReadStore;
 import org.apache.parquet.column.page.PageReader;
 import org.apache.parquet.format.converter.ParquetMetadataConverter;
+import org.apache.parquet.column.statistics.Statistics;
 import org.apache.parquet.hadoop.ParquetFileReader;
 import org.apache.parquet.hadoop.metadata.BlockMetaData;
 import org.apache.parquet.hadoop.metadata.ColumnChunkMetaData;
@@ -265,6 +266,12 @@ public class DumpCommand extends ArgsOnlyCommand {
                 out.format(" DLE:%s", pageV1.getDlEncoding());
                 out.format(" RLE:%s", pageV1.getRlEncoding());
                 out.format(" VLE:%s", pageV1.getValueEncoding());
+                Statistics<?> statistics = pageV1.getStatistics();
+                if (statistics != null) {
+                  out.format(" ST:[%s]", statistics);
+                } else {
+                  out.format(" ST:[none]");
+                }
                 return null;
               }
 
@@ -273,6 +280,12 @@ public class DumpCommand extends ArgsOnlyCommand {
                 out.format(" DLE:RLE");
                 out.format(" RLE:RLE");
                 out.format(" VLE:%s", pageV2.getDataEncoding());
+                Statistics<?> statistics = pageV2.getStatistics();
+                if (statistics != null) {
+                  out.format(" ST:[%s]", statistics);
+                } else {
+                  out.format(" ST:[none]");
+                }
                 return null;
               }
             });


Mime
View raw message