-
Notifications
You must be signed in to change notification settings - Fork 25.2k
SQL: NPE for a null parameter in LIKE #53557
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
Labels
Comments
Pinging @elastic/es-search (:Search/SQL) |
matriv
added a commit
to matriv/elasticsearch
that referenced
this issue
Mar 14, 2020
Fix NPE when `null` is passed as a parameter for a parameterized pattern of LIKE/RLIKE. e.g.: `field LIKE ?` params=[null]` Check for null pattern in LIKE/RLIKE as for RLIKE (RegexpQuery) we get an IllegalArgumentExpression from Lucence but for LIKE (WildcardQuery) we get an NPE. Fixes: elastic#53557
matriv
added a commit
that referenced
this issue
Mar 16, 2020
Fix NPE when `null` is passed as a parameter for a parameterized pattern of LIKE/RLIKE. e.g.: `field LIKE ?` params=[null]` Check for null pattern in LIKE/RLIKE as for RLIKE (RegexpQuery) we get an IllegalArgumentExpression from Lucence but for LIKE (WildcardQuery) we get an NPE. Fixes: #53557
matriv
added a commit
that referenced
this issue
Mar 16, 2020
Fix NPE when `null` is passed as a parameter for a parameterized pattern of LIKE/RLIKE. e.g.: `field LIKE ?` params=[null]` Check for null pattern in LIKE/RLIKE as for RLIKE (RegexpQuery) we get an IllegalArgumentExpression from Lucence but for LIKE (WildcardQuery) we get an NPE. Fixes: #53557 (cherry picked from commit ec3481e)
matriv
added a commit
that referenced
this issue
Mar 16, 2020
Fix NPE when `null` is passed as a parameter for a parameterized pattern of LIKE/RLIKE. e.g.: `field LIKE ?` params=[null]` Check for null pattern in LIKE/RLIKE as for RLIKE (RegexpQuery) we get an IllegalArgumentExpression from Lucence but for LIKE (WildcardQuery) we get an NPE. Fixes: #53557 (cherry picked from commit ec3481e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Providing a
null
value parameter to the LIKE operator and a parameter marker leads to an NPE, like exemplified below.Example:
SELECT ... FROM ... WHERE field LIKE ?
and parameter
{"type": ..., "value":null}
The text was updated successfully, but these errors were encountered: