Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Support WHERE clause in new SQL parser #682

Conversation

dai-chen
Copy link
Member

@dai-chen dai-chen commented Aug 13, 2020

Issue #, if available:

With WHERE clause enabled in new engine, the following issues can be resolved:

  1. Wildcard syntax problem #368: LIKE text issue
  2. Boolean expressions not supported in SELECT clause #237: Boolean expression in SELECT
  3. Arithmetic operations not supported in WHERE clause #234: Arithmetic expression in WHERE
  4. Is there a way to use optional parameters in query? #690: Optional param for JDBC (null is null)

Description of changes: Changed new SQL parser grammar to enable WHERE clause and logical expressions (AND, OR, NOT).

Testing: Added new UT and IT (comparison test). Added test for the issues above to verify the fix.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dai-chen dai-chen added the SQL label Aug 13, 2020
@dai-chen dai-chen self-assigned this Aug 13, 2020
@dai-chen dai-chen changed the title Support where in new engine Support WHERE clause in new SQL parser Aug 13, 2020
@dai-chen dai-chen marked this pull request as ready for review August 18, 2020 18:16
Copy link
Member

@chloe-zh chloe-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Contributor

@penghuo penghuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change!

@dai-chen dai-chen merged commit 96ab275 into opendistro-for-elasticsearch:develop Aug 19, 2020
@dai-chen dai-chen deleted the support-where-in-new-engine branch August 19, 2020 22:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants