RussellSpitzer commented on code in PR #11948:
URL: https://github.com/apache/iceberg/pull/11948#discussion_r1917362724


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -1468,6 +1514,45 @@ public Builder setPreviousFileLocation(String 
previousFileLocation) {
       return this;
     }
 
+    private Builder setRowLineage(Boolean newRowLineage) {
+      if (newRowLineage == null) {
+        return this;
+      }
+
+      boolean disablingRowLineage = rowLineage && !newRowLineage;
+
+      Preconditions.checkArgument(
+          !disablingRowLineage, "Cannot disable row lineage once it has been 
enabled");
+
+      if (!rowLineage && newRowLineage) {
+        return enableRowLineage();
+      } else {
+        return this;
+      }
+    }
+
+    public Builder enableRowLineage() {

Review Comment:
   Oops sorry, when I meant to do here is we only allow a public method that 
turns on RowLineage. There is no public way to turn off table lineage. So I 
think this is good as is. The method above this is just a private helper to 
determine whether or not enableRowLineage should be called. I added it when I 
added the method for turning on row-lineage via a table property but I don't 
want anyone calling this outside of this class.



-- 
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

Reply via email to