Initial-neko edited a comment on issue #3521:
URL: https://github.com/apache/iceberg/issues/3521#issuecomment-966789613
```
/**
* skip the AbstractConstraint comparison
* @param rawSchema
* @param newSchema
* @return
*/
public boolean schemaCompare(TableSchema rawSchema, TableSchema newSchema){
UniqueConstraint rawPK = rawSchema.getPrimaryKey().orElse(null);
UniqueConstraint newPK = newSchema.getPrimaryKey().orElse(null);
boolean exp =
rawSchema.getTableColumns().equals(newSchema.getTableColumns()) &&
rawSchema.getWatermarkSpecs().equals(newSchema.getWatermarkSpecs());
boolean exp2 = rawPK != null && newPK != null ?
rawPK.getColumns().equals(newPK.getColumns()) &&
rawPK.getType().equals(newPK.getType()) : true;
return exp && exp2;
}
```
this new compare code can solve this problem. But I'm a new member of the
community. Can anyone give me some suggestions,Thanks!
--
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]