Skip to content

Like, NotLike expressions work with literal NULL #2626

@WinkerDu

Description

@WinkerDu

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
like, not like expressions doesn't work well with literal NULL in DF.

To Reproduce

> SELECT column1 like NULL from (values('a'), ('b'), (NULL)) as t
Plan("'Utf8 LIKE Null' can't be evaluated because there isn't a common type to coerce the types to")

Postgres works like

# SELECT column1 like NULL from (values('a'), ('b'), (NULL)) as t;
 ?column? 
----------
 
 
 
(3 rows)

Describe the solution you'd like

  • Introduces null_coercion to like_coercion
  • Enhances compute_utf8_op_scalar to produce null array when scalar value NULL inputs.

Describe alternatives you've considered
No.

Additional context
No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions