Skip to content

[Bug] MultisetType does not override equalsIgnoreFieldId/isPrunedFrom #8516

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ 0e22fa8 / 2.0-SNAPSHOT

Compute Engine
Engine-agnostic (core)

Minimal reproduce step
MultisetType (paimon-api/src/main/java/org/apache/paimon/types/MultisetType.java) does not override equalsIgnoreFieldId(DataType) or isPrunedFrom(Object). It inherits the DataType base implementations, which just return equals(o) and therefore compare element field ids. Its sibling nested types ArrayType, MapType, RowType, and VectorType all override both methods to recurse into their element/key/value types.

What doesn't meet your expectations?
For MULTISET<ROW<...>>, equalsIgnoreFieldId and isPrunedFrom wrongly return false when only field ids differ. Because DataField.equalsIgnoreFieldId and RowType.equalsIgnoreFieldId recurse through the element type, this corrupts schema-evolution comparison and column pruning whenever a multiset of a nested type is involved.

Anything else?
Two MULTISET<ROW<f:INT>> values with different field ids compare unequal under equalsIgnoreFieldId, and a pruned MULTISET<ROW<f>> is not recognized as pruned from MULTISET<ROW<f,g>>.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions