the-other-tim-brown commented on code in PR #728:
URL: https://github.com/apache/incubator-xtable/pull/728#discussion_r2286784251
##########
xtable-core/src/main/java/org/apache/xtable/iceberg/IcebergColumnStatsConverter.java:
##########
@@ -68,12 +72,28 @@ public Metrics toIceberg(Schema schema, long totalRowCount,
List<ColumnStat> fie
nullValueCounts.put(fieldId, columnStats.getNumNulls());
Type fieldType = icebergField.type();
if (columnStats.getRange().getMinValue() != null) {
- lowerBounds.put(
- fieldId, Conversions.toByteBuffer(fieldType,
columnStats.getRange().getMinValue()));
+ if (fieldType.toString() == "string" && format ==
"APACHE_PARQUET") {
Review Comment:
That is how the data is serialized but in this case it looks like the field
is a string, which is a [logical
type](https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#string-types)
on top of the binary representation. In that case, it should be handled as a
string when converting from the parquet stats to the internal Range object.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]