Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/805#discussion_r109536003
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java
---
@@ -1668,9 +1666,16 @@ public ColumnMetadata_v3(String[] name,
PrimitiveTypeName primitiveType, Object
return nulls;
}
+ /**
+ * Checks that the column chunk has single value.
+ * Returns true if minValue and maxValue are null and
+ * column statistics was available.
+ *
+ * @return true if column has single value
+ */
@Override
public boolean hasSingleValue() {
- return (minValue !=null && maxValue != null &&
minValue.equals(maxValue));
+ return minValue != null ? minValue.equals(maxValue) : (maxValue ==
null && isMetadataSet());
--- End diff --
We probably need better definition of "column has single value", before go
ahead and modify this function. Cases we need consider:
1) minValue / maxValue != null and there is no "null" in the column.
2) minValue / maxValue != null and there is "null" in the column.
3) minValue/maxValue == null, and there is "null" in the column
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---