Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: implement null safe equality operator <=> #35871

Closed
matriv opened this issue Nov 23, 2018 · 1 comment
Closed

SQL: implement null safe equality operator <=> #35871

matriv opened this issue Nov 23, 2018 · 1 comment

Comments

@matriv
Copy link
Contributor

matriv commented Nov 23, 2018

Null safe equality operator <=> is used by MySQL
and always returns either TRUE or FALSE even if the operants are null:

'foo' <=> null => false
null <=> 'bar'  => false
null <=> null => true

Relates to: #34956

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

matriv added a commit to matriv/elasticsearch that referenced this issue Nov 23, 2018
This operator handles nulls in different way than the normal `=`.
If one of the operants is `null` and the other not it returns `false`.
If both operants are `null` it returns `true`. Therefore in contrary to
`=`, which returns `null` if at least one of the operants is `null`, this one
never returns `null` as a result.

Closes: elastic#35871
matriv added a commit that referenced this issue Nov 26, 2018
This operator handles nulls in different way than the normal `=`.
If one of the operants is `null` and the other not it returns `false`.
If both operants are `null` it returns `true`. Therefore in contrary to
`=`, which returns `null` if at least one of the operants is `null`, this one
never returns `null` as a result.

Closes: #35871
matriv added a commit that referenced this issue Nov 26, 2018
This operator handles nulls in different way than the normal `=`.
If one of the operants is `null` and the other not it returns `false`.
If both operants are `null` it returns `true`. Therefore in contrary to
`=`, which returns `null` if at least one of the operants is `null`, this one
never returns `null` as a result.

Closes: #35871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants