thswlsqls opened a new issue, #8811:
URL: https://github.com/apache/paimon/issues/8811

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ d3b62affb (2.0-SNAPSHOT)
   
   **Compute Engine**
   Engine-agnostic (paimon-api)
   
   **Minimal reproduce step**
   Call `DataTypes.VECTOR(3, 
DataTypes.FLOAT()).isPrunedFrom(DataTypes.VECTOR(5, DataTypes.FLOAT()))`. 
`VectorType.isPrunedFrom` (paimon-api `VectorType.java` lines 155-167) recurses 
into the element type but never compares `length`, so it returns `true`.
   
   **What doesn't meet your expectations?**
   Two vector types with different lengths are not in a pruning relation. Every 
other comparison in the class treats `length` as part of the type identity: 
`equals` (line 135), `equalsIgnoreFieldId` (lines 150-151) and `hashCode` (line 
171) all include it. `isPrunedFrom` should return `false` here, mirroring 
`equalsIgnoreFieldId`.
   
   **Anything else?**
   The only subset-style override is `RowType.isPrunedFrom` (field selection). 
Scalar-parameterized siblings (`CharType`, `DecimalType`, `TimestampType`) 
inherit `DataType.isPrunedFrom`, which requires full equality — `VectorType` is 
the only type ignoring a scalar parameter. The missing term dates from the 
commit introducing the type (160a3cdcb), where the sibling comparison methods 
already included `length`.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   
   


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