rdblue commented on code in PR #5601:
URL: https://github.com/apache/iceberg/pull/5601#discussion_r953197292
##########
api/src/main/java/org/apache/iceberg/transforms/Bucket.java:
##########
@@ -79,8 +77,16 @@ public Integer numBuckets() {
return numBuckets;
}
- @VisibleForTesting
- abstract int hash(T value);
+ @Override
+ @SuppressWarnings("unchecked")
+ public Function<T, Integer> bind(Type type) {
+ return (Function<T, Integer>) get(type, numBuckets);
+ }
+
+ protected int hash(T value) {
Review Comment:
That's right. Bucket is no longer abstract because it doesn't need a
concrete `apply` implementation. In the future, `apply` will be removed and
`bind` will be used for everything.
--
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]