Skip to content

Incorrect implementation of PartialOrd for ScalarUDF, WindowUDF and AggregateUDF #17064

@findepi

Description

@findepi

PartialOrd implementation for ScalarUDF, WindowUDF and AggregateUDF compares name and signature only.
PartialEq implementation for these structs delegates to the function implementation and thus may compare other properties.

the contract for these traits is (https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html):

a == b if and only if partial_cmp(a, b) == Some(Equal).
[...]

thus the contract is violated

We should remove these incorrect PartialOrd implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api changeChanges the API exposed to users of the cratebugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions