Skip to content

Implement ppl IN subquery command with Calcite #3371

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

Merged

Conversation

LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Mar 3, 2025

Description

Core Syntax: Implement ppl IN subquery command with Calcite

./gradlew :integ-test:integTest --tests '*Calcite*IT' succeed in local
Excepts

CalcitePPLInSubqueryIT. testInSubqueryWithTableAlias
CalcitePPLInSubqueryIT. testSelfInSubquery

Those IT failed due to enable pushdown after merged #3366

Related Issues

Resolves #3359

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@LantaoJin LantaoJin marked this pull request as ready for review March 3, 2025 14:59
@LantaoJin LantaoJin added the calcite calcite migration releated label Mar 3, 2025
@LantaoJin LantaoJin changed the title Implement ppl InSubquery command with Calcite Implement ppl IN subquery command with Calcite Mar 3, 2025
@LantaoJin
Copy link
Member Author

cc @penghuo @dai-chen @qianheng-aws

source = %s | fields uid, name
]
| sort - salary
| fields id, name, salary
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • what if subquery include less columns source = %s | where (id, name) not in [source = %s | fields name]
  • or more columns, source = %s | where (id, name) not in [source = %s | fields id, name, salary]

Copy link
Member Author

Choose a reason for hiding this comment

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

check L314

Copy link
Member Author

Choose a reason for hiding this comment

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

Added more tests and convert the AssertError to SemanticCheckException @penghuo

@LantaoJin LantaoJin merged commit a62d87d into opensearch-project:feature/calcite-engine Mar 4, 2025
5 of 13 checks passed
penghuo pushed a commit to penghuo/os-sql that referenced this pull request Mar 12, 2025
penghuo pushed a commit that referenced this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
calcite calcite migration releated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants