mirror of
https://github.com/apache/druid.git
synced 2025-02-25 04:16:07 +00:00
fix parquet parse performance issue (#6833)
* check that value is present before conversion to prevent silent, expensive exception and fix another bug * cleanup * now with less parenthesis
This commit is contained in:
parent
934c83bca6
commit
ccfd1244d1
@ -62,6 +62,10 @@ class ParquetGroupConverter
|
||||
|
||||
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 @@ class ParquetGroupConverter
|
||||
// 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user