Skip to content

Support describe command with Calcite#3624

Merged
LantaoJin merged 3 commits intoopensearch-project:mainfrom
LantaoJin:pr/issues/3460
May 21, 2025
Merged

Support describe command with Calcite#3624
LantaoJin merged 3 commits intoopensearch-project:mainfrom
LantaoJin:pr/issues/3460

Conversation

@LantaoJin
Copy link
Copy Markdown
Member

@LantaoJin LantaoJin commented May 15, 2025

Description

Support describe command with Calcite

Related Issues

Resolves #3460

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: Lantao Jin <ltjin@amazon.com>
LantaoJin added 2 commits May 20, 2025 10:01
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin
Copy link
Copy Markdown
Member Author

An additional code refactoring introduced with this feature includes:

  1. rename OpenSearchTable to AbstractOpenSearchTable
  2. AbstractOpenSearchTable extends org.apache.calcite.schema.impl.AbstractTable instead of org.apache.calcite.adapter.AbstractQueryableTable and remove corresponding motheds.
  3. delete OpenSearchQueryable.java
    cc @dai-chen @qianheng-aws

Comment on lines +42 to +56
@Override
public @Nullable Pair<RelTraitSet, List<RelTraitSet>> passThroughTraits(RelTraitSet required) {
return EnumerableRel.super.passThroughTraits(required);
}

@Override
public @Nullable Pair<RelTraitSet, List<RelTraitSet>> deriveTraits(
RelTraitSet childTraits, int childId) {
return EnumerableRel.super.deriveTraits(childTraits, childId);
}

@Override
public DeriveMode getDeriveMode() {
return EnumerableRel.super.getDeriveMode();
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we need override?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems tacitly add by IDE. Will delete them in later PR.

@LantaoJin LantaoJin merged commit 93fa20f into opensearch-project:main May 21, 2025
22 checks passed
penghuo pushed a commit that referenced this pull request Jun 16, 2025
* Support describe command with Calcite

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* add java doc and class rename

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* refactor to remove the useless Queryable interface

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@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

calcite calcite migration releated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support Describe Command with Calcite

3 participants