You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/10 17:18:59 UTC

[GitHub] fjy closed pull request #6833: fix parquet parse performance issue

fjy closed pull request #6833: fix parquet parse performance issue 
URL: https://github.com/apache/incubator-druid/pull/6833
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java b/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java
index 8cb193862e3..0aed764f127 100644
--- a/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java
+++ b/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java
@@ -62,6 +62,10 @@ private static Object convertField(Group g, String fieldName, boolean binaryAsSt
 
     final int fieldIndex = g.getType().getFieldIndex(fieldName);
 
+    if (g.getFieldRepetitionCount(fieldIndex) <= 0) {
+      return null;
+    }
+
     Type fieldType = g.getType().getFields().get(fieldIndex);
 
     // primitive field
@@ -269,7 +273,7 @@ private static Object convertPrimitiveField(Group g, int fieldIndex, int index,
         // convert logical types
         switch (ot) {
           case DATE:
-            long ts = g.getInteger(fieldIndex, 0) * MILLIS_IN_DAY;
+            long ts = g.getInteger(fieldIndex, index) * MILLIS_IN_DAY;
             return ts;
           case TIME_MICROS:
             return g.getLong(fieldIndex, index);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org