Skip to content

Improve performance of PartialOrd for logical nodes #17477

@alamb

Description

@alamb

PartialOrd / PartialEq are used during planning and thus affect planning performance.

We found some improvements that are possible in

I think self == other will (re) compare all entries in self.values and other.values again

we can probably avoid checking values == other.values here by just checking the missing field.

however, it's important to write the PartialOrd / Ord implementation so that every field is explicitly handled (addition of a new field without changing the impl should result in the compile-time error)

            .filter(|cmp| *cmp != Ordering::Equal || self.schema == other.schema)

Originally posted by @alamb in #17438 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions