nastra commented on code in PR #12593: URL: https://github.com/apache/iceberg/pull/12593#discussion_r2028237073
########## core/src/main/java/org/apache/iceberg/TableMetadata.java: ########## @@ -1011,10 +996,25 @@ private Builder(TableMetadata base) { this.specsById = Maps.newHashMap(base.specsById); this.sortOrdersById = Maps.newHashMap(base.sortOrdersById); - this.rowLineage = base.rowLineageEnabled; this.nextRowId = base.nextRowId; } + /** + * Enables row lineage in v3 tables. + * + * @deprecated will be removed in 1.10.0; row lineage is required for all v3+ tables. + */ + @Deprecated + public Builder enableRowLineage() { + if (formatVersion < MIN_FORMAT_VERSION_ROW_LINEAGE) { + throw new UnsupportedOperationException( + "Cannot enable row lineage for format-version=" + formatVersion); + } + + // otherwise this is a no-op + return null; Review Comment: I would have expected that this method would return `this` instead of `null` as otherwise library users using this method would now get a NPE -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org