rdblue commented on code in PR #5601:
URL: https://github.com/apache/iceberg/pull/5601#discussion_r953198043


##########
api/src/main/java/org/apache/iceberg/transforms/Truncate.java:
##########
@@ -131,40 +219,16 @@ public UnboundPredicate<Integer> projectStrict(String 
name, BoundPredicate<Integ
       }
       return null;
     }
-
-    @Override
-    public boolean equals(Object o) {
-      if (this == o) {
-        return true;
-      } else if (!(o instanceof TruncateInteger)) {
-        return false;
-      }
-
-      TruncateInteger that = (TruncateInteger) o;
-      return width == that.width;
-    }
-
-    @Override
-    public int hashCode() {
-      return Objects.hashCode(width);
-    }
-
-    @Override
-    public String toString() {
-      return "truncate[" + width + "]";
-    }
   }
 
-  private static class TruncateLong extends Truncate<Long> {
-    private final int width;
-
+  private static class TruncateLong extends Truncate<Long> implements 
Function<Long, Long> {
     private TruncateLong(int width) {
-      this.width = width;
+      super(width);
     }
 
     @Override
-    public Integer width() {
-      return width;
+    public Function<Long, Long> bind(Type type) {
+      return this;

Review Comment:
   The only difference is that this function operations on longs rather than 
ints.



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