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: WHERE with condition evaluating to false doesn't work #34613

Closed
matriv opened this issue Oct 18, 2018 · 1 comment
Closed

SQL: WHERE with condition evaluating to false doesn't work #34613

matriv opened this issue Oct 18, 2018 · 1 comment

Comments

@matriv
Copy link
Contributor

matriv commented Oct 18, 2018

When the condition in WHERE clause can be evaluated (literal expression) and evaluates to false, an exception is thrown:

java.sql.SQLFeatureNotSupportedException: Found 1 problem(s)
line 1:8: Unexecutable item

E.g.: select * from test_emp where 1>2

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@matriv matriv self-assigned this Oct 24, 2018
matriv added a commit to matriv/elasticsearch that referenced this issue Oct 24, 2018
Previously, `Mapper` was returning an incorrect plan which resulted in an
```
SQLFeatureNotSupportedException: Found 1 problem(s)
line 1:8: Unexecutable item
```

Queries with a `WHERE` and/or `HAVING` clause which results in NO_MATCH
are now handled correctly and return 0 rows.

Fixes: elastic#34613

Co-authored-by: Costin Leau <costin.leau@gmail.com>
matriv pushed a commit that referenced this issue Oct 24, 2018
Previously, `Mapper` was returning an incorrect plan which resulted in an
```
SQLFeatureNotSupportedException: Found 1 problem(s)
line 1:8: Unexecutable item
```

Queries with a `WHERE` and/or `HAVING` clause which results in NO_MATCH
are now handled correctly and return 0 rows.

Fixes: #34613

Co-authored-by: Costin Leau <costin.leau@gmail.com>
matriv pushed a commit that referenced this issue Oct 24, 2018
Previously, `Mapper` was returning an incorrect plan which resulted in an
```
SQLFeatureNotSupportedException: Found 1 problem(s)
line 1:8: Unexecutable item
```

Queries with a `WHERE` and/or `HAVING` clause which results in NO_MATCH
are now handled correctly and return 0 rows.

Fixes: #34613

Co-authored-by: Costin Leau <costin.leau@gmail.com>
kcm pushed a commit that referenced this issue Oct 30, 2018
Previously, `Mapper` was returning an incorrect plan which resulted in an
```
SQLFeatureNotSupportedException: Found 1 problem(s)
line 1:8: Unexecutable item
```

Queries with a `WHERE` and/or `HAVING` clause which results in NO_MATCH
are now handled correctly and return 0 rows.

Fixes: #34613

Co-authored-by: Costin Leau <costin.leau@gmail.com>
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