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

Support subquery in FROM clause in new engine #822

Merged
merged 14 commits into from
Nov 17, 2020

Conversation

chloe-zh
Copy link
Member

Issue #, if available:
#375

Description of changes:

  • Added subquery in FROM as table source in grammar and parser
  • Created new tree node RelationSubquery in AST standing for subquery as table
  • Added test cases
  • Skipped a broken test case in SubqueryIT.java caused by different schema in new engine

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

@chloe-zh chloe-zh added the SQL label Nov 13, 2020
@chloe-zh chloe-zh requested review from penghuo and dai-chen November 13, 2020 02:12
@chloe-zh chloe-zh self-assigned this Nov 13, 2020
@dai-chen
Copy link
Member

Can you add examples for new features that we can support now? https://github.com/opendistro-for-elasticsearch/sql/blob/develop/docs/user/dql/complex.rst#example-2-subquery-in-from-clause

For example, two levels of subquery in FROM, a subquery with GROUP BY etc.

Copy link
Member

@dai-chen dai-chen 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 changes! Btw, in the doc, you can doctest, no need to follow the old format.

@chloe-zh
Copy link
Member Author

Thanks for the changes! Btw, in the doc, you can doctest, no need to follow the old format.

Thanks, done!

@chloe-zh chloe-zh merged commit d5bf60c into opendistro-for-elasticsearch:develop Nov 17, 2020
penghuo pushed a commit that referenced this pull request Dec 15, 2020
* support subquery in from

* update

* added java doc

* added unit test

* added comparison test cases

* skipped a broken test in SubqueryIT.java due to different schema in new engine

* added case for issue #375

* update

* update

* address comments

* address comments

* put the context push after subquery analysis recursion
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