-
Notifications
You must be signed in to change notification settings - Fork 25k
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: NPE when using CASE WHEN with CASTed returned value #46551
Labels
Comments
Pinging @elastic/es-search |
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
Sep 10, 2019
Many scalar functions try to find out the common type between their arguments in order to set it as their return time, e.g.: for <float> + <double> the common type which is set as the return type of the + operation is double. Previously, for data types TEXT and KEYWORD (string data types) there was no common data type found and null was returned causing NPEs when the function was trying to resolve the return data type. Fixes: elastic#46551
matriv
added a commit
that referenced
this issue
Sep 11, 2019
Many scalar functions try to find out the common type between their arguments in order to set it as their return time, e.g.: for `float + double` the common type which is set as the return type of the + operation is `double`. Previously, for data types TEXT and KEYWORD (string data types) there was no common data type found and null was returned causing NPEs when the function was trying to resolve the return data type. Fixes: #46551
matriv
added a commit
that referenced
this issue
Sep 11, 2019
Many scalar functions try to find out the common type between their arguments in order to set it as their return time, e.g.: for `float + double` the common type which is set as the return type of the + operation is `double`. Previously, for data types TEXT and KEYWORD (string data types) there was no common data type found and null was returned causing NPEs when the function was trying to resolve the return data type. Fixes: #46551 (cherry picked from commit 291017d)
matriv
added a commit
that referenced
this issue
Sep 11, 2019
Many scalar functions try to find out the common type between their arguments in order to set it as their return time, e.g.: for `float + double` the common type which is set as the return type of the + operation is `double`. Previously, for data types TEXT and KEYWORD (string data types) there was no common data type found and null was returned causing NPEs when the function was trying to resolve the return data type. Fixes: #46551 (cherry picked from commit 291017d)
matriv
added a commit
that referenced
this issue
Sep 11, 2019
Many scalar functions try to find out the common type between their arguments in order to set it as their return time, e.g.: for `float + double` the common type which is set as the return type of the + operation is `double`. Previously, for data types TEXT and KEYWORD (string data types) there was no common data type found and null was returned causing NPEs when the function was trying to resolve the return data type. Fixes: #46551 (cherry picked from commit 291017d)
matriv
added a commit
that referenced
this issue
Sep 11, 2019
Many scalar functions try to find out the common type between their arguments in order to set it as their return time, e.g.: for `float + double` the common type which is set as the return type of the + operation is `double`. Previously, for data types TEXT and KEYWORD (string data types) there was no common data type found and null was returned causing NPEs when the function was trying to resolve the return data type. Fixes: #46551 (cherry picked from commit 291017d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SELECT CASE WHEN salary IS NOT NULL THEN CAST(gender AS VARCHAR) ELSE gender END AS x FROM test_emp
The text was updated successfully, but these errors were encountered: