danielcweeks commented on code in PR #16441:
URL: https://github.com/apache/iceberg/pull/16441#discussion_r3376551312
##########
core/src/main/java/org/apache/iceberg/StatsUtil.java:
##########
@@ -34,80 +36,67 @@
class StatsUtil {
private static final Logger LOG = LoggerFactory.getLogger(StatsUtil.class);
- // the number of reserved field IDs from the reserved field ID space as
defined in
- // https://iceberg.apache.org/spec/#reserved-field-ids
- static final int NUM_RESERVED_FIELD_IDS = 200;
- // the starting field ID of the reserved field ID space
- static final int RESERVED_FIELD_IDS_START = Integer.MAX_VALUE -
NUM_RESERVED_FIELD_IDS;
- // the number of supported stats per table column
+ static final Set<Integer> SUPPORTED_METADATA_FIELD_IDS =
+ ImmutableSet.of(
+ MetadataColumns.LAST_UPDATED_SEQUENCE_NUMBER.fieldId(),
MetadataColumns.ROW_ID.fieldId());
+ private static final int FIRST_SUPPORTED_METADATA_FIELD_ID =
+ Collections.min(SUPPORTED_METADATA_FIELD_IDS);
static final int NUM_SUPPORTED_STATS_PER_COLUMN = 200;
- // the starting field ID of the stats space for data field IDs
+ static final int STATS_SPACE_FIELD_ID_START_FOR_METADATA_FIELDS = 9_000;
static final int STATS_SPACE_FIELD_ID_START_FOR_DATA_FIELDS = 10_000;
- // the starting field ID of the stats space for metadata field IDs
- static final int STATS_SPACE_FIELD_ID_START_FOR_METADATA_FIELDS =
2_147_000_000;
- // support stats for only up to this amount of data field IDs
- static final int MAX_DATA_FIELD_ID = 1_000_000;
- static final int MAX_DATA_STATS_FIELD_ID = 200_010_000;
+ // exclusive upper bound of the stats field ID range reserved for
content_stats
+ static final int STATS_SPACE_FIELD_ID_END = 200_000_000;
Review Comment:
Did we define this upper bound in the spec. I couldn't find it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]