Skip to content

Add support binary boolean operators with nulls #4241

@Ted-Jiang

Description

@Ted-Jiang

in datafsuion:

❯ select true or NULL ;
Plan("'Boolean OR Null' can't be evaluated because there isn't a common type to coerce the types to")
❯ select true or FALSE ;
+---------------------------------+
| Boolean(true) OR Boolean(false) |
+---------------------------------+
| true                            |
+---------------------------------+
1 row in set. Query took 0.003 seconds.
❯

RUN in spark-sql

spark-sql> select true or false;
true
Time taken: 3.139 seconds, Fetched 1 row(s)
spark-sql> select true or NULL;
true
Time taken: 0.076 seconds, Fetched 1 row(s)
spark-sql> select FALSE or NULL;
NULL
Time taken: 0.06 seconds, Fetched 1 row(s)
spark-sql>

I think its ok get error when run NULL or xxx

Originally posted by @Ted-Jiang in #4200 (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