LuciferYang opened a new issue, #13226:
URL: https://github.com/apache/gravitino/issues/13226

   **Version**
   main branch
   
   **Describe what's wrong**
   `SingleFieldTransform.equals` uses an `instanceof` check, so transforms of 
different types over the same field compare equal: 
`year(ts).equals(identity(ts))` returns `true`, and a `HashSet` silently 
deduplicates distinct partitioning transforms. All five concrete subclasses 
delegate to this `equals`.
   
   **Error message and/or stacktrace**
   N/A: incorrect `equals` result, no exception.
   
   **How to reproduce**
   Compare `Transforms.year(field)` with `Transforms.identity(field)` over the 
same field name; `equals` returns `true`. Adding both to a `HashSet` collapses 
them to one element.
   
   **Additional context**
   The sibling `BucketTransform` and friends compare by class. This is 
`@Evolving` API. Found during a code audit of the `api` module.
   


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

Reply via email to