Skip to content

Conversation

@qianheng-aws
Copy link
Collaborator

@qianheng-aws qianheng-aws commented Apr 11, 2025

Description

Support alias type.

Since Calcite's logical fields is strictly binding to an offset of its physical array, we have to use an approach different from v2(#3246) but more like the implementation in opensearch-spark(opensearch-project/opensearch-spark#1032).

Related Issues

Resolves #3397

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.

Signed-off-by: Heng Qian <qianheng@amazon.com>
penghuo
penghuo previously approved these changes Apr 11, 2025
executeQuery(
String.format(
"source=%s | where alias_col > 1 " + "| fields original_col, alias_col ",
"source=%s | eval a = 1 | where alias_col > 1 | fields original_col, alias_col ",
Copy link
Collaborator

Choose a reason for hiding this comment

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

why need a=1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why need a=1?

Avoid the filter push down to ensure the PR really works.

Copy link
Member

Choose a reason for hiding this comment

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

Please add a test in our standalone IT which could ensure the pushdown w/wo always works. The eval a=1 in future will trigger push down as well.

Signed-off-by: Heng Qian <qianheng@amazon.com>
@penghuo penghuo merged commit 9509c1a into opensearch-project:main Apr 14, 2025
22 checks passed
penghuo pushed a commit that referenced this pull request Jun 16, 2025
* [Calcite Engine] Support alias type field

Signed-off-by: Heng Qian <qianheng@amazon.com>

* Add standalone IT to ensure w/wo push down test cases

Signed-off-by: Heng Qian <qianheng@amazon.com>

---------

Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Calcite Engine: Support Alias type

3 participants