Skip to content

Improve the PartialEq implementation for UDF expressions #127

@alamb

Description

@alamb

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10963

An implementation of {{PartialEq}} for {{ScalarUDF}} and {{AggregateUDF}} was added in ARROW-10808 ([pull request|https://github.com/apache/arrow/pull/8836]), which was a requirement for the {{PartialEq}} derivation for {{Expr}}.

The implementation checks equality on only the UDFs' {{name}} and {{signature}} fields: the underlying assumption is two UDFs with the same name and signature must be the same UDF. This assumption may hold up in a SQL context where UDFs are registered by name (therefore guaranteeing they are distinct), however, it doesn't hold up in a general case where there are no uniqueness requirements on the name.

Improve the equality implementation for {{ScalarUDF}} and {{AggregateUDF}}. For additional context, see the discussion in the pull request [here|https://github.com/apache/arrow/pull/8836#discussion_r536874229].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

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