You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/06 00:52:10 UTC

[GitHub] [iceberg] jzhuge opened a new pull request, #4710: API: Add Schema.equals

jzhuge opened a new pull request, #4710:
URL: https://github.com/apache/iceberg/pull/4710

   Add `equals` method to Schema. It leverages the existing `sameSchema` method.
   
   This will make it easy to compare 2 schemas.
   
   Currently `Schema.toString()` is used to compare 2 schemas at a few places.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jzhuge commented on pull request #4710: API: Add equals and hashCode to Schema

Posted by GitBox <gi...@apache.org>.
jzhuge commented on PR #4710:
URL: https://github.com/apache/iceberg/pull/4710#issuecomment-1119989254

   Yeah, we might need an exact match down the road.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jzhuge commented on pull request #4710: API: Add equals and hashCode to Schema

Posted by GitBox <gi...@apache.org>.
jzhuge commented on PR #4710:
URL: https://github.com/apache/iceberg/pull/4710#issuecomment-1123987528

   Rejecting this PR in a few days if no further comment.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on pull request #4710: API: Add equals and hashCode to Schema

Posted by GitBox <gi...@apache.org>.
rdblue commented on PR #4710:
URL: https://github.com/apache/iceberg/pull/4710#issuecomment-1121800112

   @jzhuge, what does it mean for two schemas to be equal?
   
   We didn't implement this originally because it isn't clear what the right answer is. If two schemas are structurally equal but have different identity columns, are they equal? Not implementing equals avoids the problem. Is there some reason why you need `equals` and `hashCode` that makes it a good time to solve this problem?


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jzhuge commented on pull request #4710: API: Add equals and hashCode to Schema

Posted by GitBox <gi...@apache.org>.
jzhuge commented on PR #4710:
URL: https://github.com/apache/iceberg/pull/4710#issuecomment-1123985563

   Ah, didn't know this is deliberate. My only goal is to make test code cleaner, especially not to use `Schema.toString`.
   
   I guest test code can use `sameSchema` or just compare `asStruct` outputs.


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jzhuge commented on pull request #4710: API: Add equals and hashCode to Schema

Posted by GitBox <gi...@apache.org>.
jzhuge commented on PR #4710:
URL: https://github.com/apache/iceberg/pull/4710#issuecomment-1119987250

   https://github.com/apache/iceberg/blob/f68d8d426661efc0d7e5686fe833b573b74eadab/core/src/test/java/org/apache/iceberg/hadoop/TestHadoopCatalog.java#L69
   https://github.com/apache/iceberg/blob/d2bb30f863d7276097c39754b9501ba27403b73c/aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java#L87


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] jzhuge closed pull request #4710: API: Add equals and hashCode to Schema

Posted by GitBox <gi...@apache.org>.
jzhuge closed pull request #4710: API: Add equals and hashCode to Schema
URL: https://github.com/apache/iceberg/pull/4710


-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org