Guosmilesmile commented on code in PR #15776:
URL: https://github.com/apache/iceberg/pull/15776#discussion_r3001237856
##########
orc/src/main/java/org/apache/iceberg/orc/ORC.java:
##########
@@ -787,11 +787,17 @@ ReadBuilder constantFieldIds(Set<Integer>
newConstantFieldIds) {
public <D> CloseableIterable<D> build() {
Preconditions.checkNotNull(schema, "Schema is required");
+ Set<Integer> idsToExclude =
+ Sets.difference(
+ Sets.union(constantFieldIds, MetadataColumns.metadataFieldIds()),
+ ImmutableSet.of(
+ MetadataColumns.ROW_ID.fieldId(),
+ MetadataColumns.LAST_UPDATED_SEQUENCE_NUMBER.fieldId()));
Review Comment:
Yes, META_IDS contains the row ID and last update sequence. The original
code would delete all metadata-related fields, but in the lineage scenario,
`_row_id` exists in the datafile and should not be removed. Therefore, we need
to use `difference` to remove `ROW_ID` and `LAST_UPDATED_SEQUENCE_NUMBER` here.
--
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]