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

Add new sql module #527

Merged

Conversation

dai-chen
Copy link
Member

@dai-chen dai-chen commented Jun 18, 2020

Issue #, if available: #264, #256

Description of changes: Add new SQL module to integrate with new query engine. As our start point, SELECT literal support is added.

Here are the major changes:

  1. Add a new sql Gradle module.
  2. Support SELECT literal by:
    2.1 Relaxing existing Project operator to accept Expression instead of ReferenceExpression.
    2.2 Adding a new Values operator for literal values which is correspondent with ANSI VALUES clause. Reference: https://modern-sql.com/feature/values, https://crate.io/docs/crate/reference/en/latest/sql/statements/values.html.
  3. Integrate with legacy REST handler to route request to new SQL frontend.

The legacy module with all old code will co-exist with new sql module during code migration.

image

At runtime, request will send to new SQL parser first and fall back to old code if not supported yet.

image

Documentation: https://github.com/dai-chen/sql/blob/add-new-sql-module/docs/user/dql/expressions.rst

Testing: Passed old and new UT, IT and doctest.

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 marked this pull request as ready for review June 19, 2020 16:52
@dai-chen dai-chen requested review from penghuo and chloe-zh June 19, 2020 16:52
@dai-chen dai-chen self-assigned this Jun 19, 2020
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.

LGTM.

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!

@dai-chen dai-chen merged commit 087da88 into opendistro-for-elasticsearch:develop Jun 26, 2020
@dai-chen dai-chen deleted the add-new-sql-module branch June 26, 2020 23:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants