fqaiser94 commented on code in PR #6513:
URL: https://github.com/apache/iceberg/pull/6513#discussion_r1130256795


##########
core/src/main/java/org/apache/iceberg/BaseOverwriteFiles.java:
##########
@@ -165,4 +165,9 @@ private Expression dataConflictDetectionFilter() {
       return Expressions.alwaysTrue();
     }
   }
+
+  @Override
+  protected SnapshotUpdate<OverwriteFiles> returnThis() {

Review Comment:
   Sorry, this is the only comment I'm confused about. 
   
   Are you saying I should change the return type of the the 
`validateCurrentTable` method from this: 
   ```
   void validateCurrentTable(Predicate<Table> test, String message, Object... 
args)
   ```
   to this: 
   ```
   ThisT validateCurrentTable(Predicate<Table> test, String message, Object... 
args)
   ```
   ?
   
   I can do that, but this means I have to the change type signature of 
PendingUpdate from `PendingUpdate<T>` to `PendingUpdate<ThisT, T>`. 
   Every interface that extends this interface and every class that implements 
this interface will have a breaking change. 
   Is that acceptable? 
   
   If it helps, this is the commit I would need to basically revert: 
https://github.com/apache/iceberg/pull/6513/commits/455ee74f86d6b1d1a0e9d5c88dcc3a8fc2eb5782
   Also, here is a sample rev-api output of the breaking changes (actual report 
is much larger):
   
   ```
   * What went wrong:
   Execution failed for task ':iceberg-api:revapi'.
   > There were Java public API/ABI breaks reported by revapi:
     
     java.class.noLongerImplementsInterface: Class no longer implements 
interface 'org.apache.iceberg.PendingUpdate<java.util.Map<java.lang.String, 
java.lang.String>>'.
     
     old: interface org.apache.iceberg.UpdateProperties
     new: interface org.apache.iceberg.UpdateProperties
     
     SOURCE: BREAKING, BINARY: BREAKING
     
     From old archive: iceberg-api-1.1.0.jar
     From new archive: iceberg-api-1.2.0-SNAPSHOT.jar
     
     If this is an acceptable break that will not harm your users, you can 
ignore it in future runs like so for:
     
       * Just this break:
           ./gradlew :iceberg-api:revapiAcceptBreak --justification "{why this 
break is ok}" \
             --code "java.class.noLongerImplementsInterface" \
             --old "interface org.apache.iceberg.UpdateProperties" \
             --new "interface org.apache.iceberg.UpdateProperties"
       * All breaks in this project:
           ./gradlew :iceberg-api:revapiAcceptAllBreaks --justification "{why 
this break is ok}"
       * All breaks in all projects:
           ./gradlew revapiAcceptAllBreaks --justification "{why this break is 
ok}"
     
----------------------------------------------------------------------------------------------------
     java.class.nowImplementsInterface: Class now implements interface 
'org.apache.iceberg.PendingUpdate<org.apache.iceberg.UpdateProperties, 
java.util.Map<java.lang.String, java.lang.String>>'.
     
     old: interface org.apache.iceberg.UpdateProperties
     new: interface org.apache.iceberg.UpdateProperties
     
     SOURCE: NON_BREAKING, BINARY: NON_BREAKING
     
     From old archive: iceberg-api-1.1.0.jar
     From new archive: iceberg-api-1.2.0-SNAPSHOT.jar
     
     If this is an acceptable break that will not harm your users, you can 
ignore it in future runs like so for:
     
       * Just this break:
           ./gradlew :iceberg-api:revapiAcceptBreak --justification "{why this 
break is ok}" \
             --code "java.class.nowImplementsInterface" \
             --old "interface org.apache.iceberg.UpdateProperties" \
             --new "interface org.apache.iceberg.UpdateProperties"
       * All breaks in this project:
           ./gradlew :iceberg-api:revapiAcceptAllBreaks --justification "{why 
this break is ok}"
       * All breaks in all projects:
           ./gradlew revapiAcceptAllBreaks --justification "{why this break is 
ok}"
     
----------------------------------------------------------------------------------------------------
     java.class.superTypeTypeParametersChanged: Super type's type parameters 
changed from 'org.apache.iceberg.PendingUpdate<java.util.Map<java.lang.String, 
java.lang.String>>' to 
'org.apache.iceberg.PendingUpdate<org.apache.iceberg.UpdateProperties, 
java.util.Map<java.lang.String, java.lang.String>>'.
     
     old: interface org.apache.iceberg.UpdateProperties
     new: interface org.apache.iceberg.UpdateProperties
     
     SOURCE: POTENTIALLY_BREAKING, BINARY: POTENTIALLY_BREAKING
     
     From old archive: iceberg-api-1.1.0.jar
     From new archive: iceberg-api-1.2.0-SNAPSHOT.jar
     
     If this is an acceptable break that will not harm your users, you can 
ignore it in future runs like so for:
     
       * Just this break:
           ./gradlew :iceberg-api:revapiAcceptBreak --justification "{why this 
break is ok}" \
             --code "java.class.superTypeTypeParametersChanged" \
             --old "interface org.apache.iceberg.UpdateProperties" \
             --new "interface org.apache.iceberg.UpdateProperties"
       * All breaks in this project:
           ./gradlew :iceberg-api:revapiAcceptAllBreaks --justification "{why 
this break is ok}"
       * All breaks in all projects:
           ./gradlew revapiAcceptAllBreaks --justification "{why this break is 
ok}"
     
----------------------------------------------------------------------------------------------------
     java.class.noLongerImplementsInterface: Class no longer implements 
interface 'org.apache.iceberg.PendingUpdate<org.apache.iceberg.Schema>'.
     
     old: interface org.apache.iceberg.UpdateSchema
     new: interface org.apache.iceberg.UpdateSchema
     
     SOURCE: BREAKING, BINARY: BREAKING
     
     From old archive: iceberg-api-1.1.0.jar
     From new archive: iceberg-api-1.2.0-SNAPSHOT.jar
     
     If this is an acceptable break that will not harm your users, you can 
ignore it in future runs like so for:
     
       * Just this break:
           ./gradlew :iceberg-api:revapiAcceptBreak --justification "{why this 
break is ok}" \
             --code "java.class.noLongerImplementsInterface" \
             --old "interface org.apache.iceberg.UpdateSchema" \
             --new "interface org.apache.iceberg.UpdateSchema"
       * All breaks in this project:
           ./gradlew :iceberg-api:revapiAcceptAllBreaks --justification "{why 
this break is ok}"
       * All breaks in all projects:
           ./gradlew revapiAcceptAllBreaks --justification "{why this break is 
ok}"
     
----------------------------------------------------------------------------------------------------
     java.class.nowImplementsInterface: Class now implements interface 
'org.apache.iceberg.PendingUpdate<org.apache.iceberg.UpdateSchema, 
org.apache.iceberg.Schema>'.
     
     old: interface org.apache.iceberg.UpdateSchema
     new: interface org.apache.iceberg.UpdateSchema
     
     SOURCE: NON_BREAKING, BINARY: NON_BREAKING
     
     From old archive: iceberg-api-1.1.0.jar
     From new archive: iceberg-api-1.2.0-SNAPSHOT.jar
     
     If this is an acceptable break that will not harm your users, you can 
ignore it in future runs like so for:
     
       * Just this break:
           ./gradlew :iceberg-api:revapiAcceptBreak --justification "{why this 
break is ok}" \
             --code "java.class.nowImplementsInterface" \
             --old "interface org.apache.iceberg.UpdateSchema" \
             --new "interface org.apache.iceberg.UpdateSchema"
       * All breaks in this project:
           ./gradlew :iceberg-api:revapiAcceptAllBreaks --justification "{why 
this break is ok}"
       * All breaks in all projects:
           ./gradlew revapiAcceptAllBreaks --justification "{why this break is 
ok}"
     
----------------------------------------------------------------------------------------------------
     java.class.superTypeTypeParametersChanged: Super type's type parameters 
changed from 'org.apache.iceberg.PendingUpdate<org.apache.iceberg.Schema>' to 
'org.apache.iceberg.PendingUpdate<org.apache.iceberg.UpdateSchema, 
org.apache.iceberg.Schema>'.
     
     old: interface org.apache.iceberg.UpdateSchema
     new: interface org.apache.iceberg.UpdateSchema
     
     SOURCE: POTENTIALLY_BREAKING, BINARY: POTENTIALLY_BREAKING
     
     From old archive: iceberg-api-1.1.0.jar
     From new archive: iceberg-api-1.2.0-SNAPSHOT.jar
     
     If this is an acceptable break that will not harm your users, you can 
ignore it in future runs like so for:
     
       * Just this break:
           ./gradlew :iceberg-api:revapiAcceptBreak --justification "{why this 
break is ok}" \
             --code "java.class.superTypeTypeParametersChanged" \
             --old "interface org.apache.iceberg.UpdateSchema" \
             --new "interface org.apache.iceberg.UpdateSchema"
       * All breaks in this project:
           ./gradlew :iceberg-api:revapiAcceptAllBreaks --justification "{why 
this break is ok}"
       * All breaks in all projects:
           ./gradlew revapiAcceptAllBreaks --justification "{why this break is 
ok}"
     
----------------------------------------------------------------------------------------------------
   ```



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

Reply via email to