Skip to content

feat: Recognize unique over scalar Lists #29301

Description

@0guban0v

Description

#29299 recognizes List evaluation over scalar values when inner expression preserves number of List items. ARRAY_UNIQUE([1, 1, 2]) remains excluded because removing duplicates changes item count, even though result is still one scalar List and does not depend on DataFrame rows.

ARRAY_UNIQUE([1, 1, 2]) should be classified as scalar, while ARRAY_UNIQUE(values) must remain dependent on column values. Shared classification is needed by #29272 and SQL planning for constant WHERE, JOIN, and IN expressions.

Scope

  • Recognize unique inside List evaluation over scalar expressions
  • Support ordered and unordered unique operations
  • Keep other operations that change List length excluded
  • Keep source columns and other frame-dependent expressions excluded
  • Preserve evaluation errors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or an improvement of an existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions