Skip to content

Conversation

@qianheng-aws
Copy link
Collaborator

Description

Support UDT for IP, also do refactoring for ExprBasicSqlType.

Related Issues

Resolves #3395

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>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
public interface ExprRelDataType extends RelDataType, RelDataTypeFamily {
ExprType getExprType();
@Getter
public abstract class ExprRelDataType<T extends RelDataType> extends RelDataTypeImpl {
Copy link
Member

Choose a reason for hiding this comment

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

rename to AbstractExprRelDataType

import org.opensearch.sql.calcite.utils.OpenSearchTypeFactory;
import org.opensearch.sql.calcite.utils.OpenSearchTypeFactory.ExprUDT;

public class ExprSqlType extends ExprRelDataType<BasicSqlType> {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add some comments on ExprSqlType and ExprJavaType to explain why ExprDateType extends ExprSqlType but ExprIPType extends ExprJavaType

Signed-off-by: Heng Qian <qianheng@amazon.com>
@qianheng-aws
Copy link
Collaborator Author

CI on macos/linux failed because network error:

Could not determine the dependencies of task ':doctest:runRestTestCluster'.
> Server returned HTTP response code: 403 for URL: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0-beta1/10962/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-3.0.0.0-beta1.zip

@LantaoJin LantaoJin added the calcite calcite migration releated label Apr 1, 2025
@LantaoJin
Copy link
Member

LantaoJin commented Apr 1, 2025

CI on macos/linux failed because network error:

Could not determine the dependencies of task ':doctest:runRestTestCluster'.
> Server returned HTTP response code: 403 for URL: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/3.0.0-beta1/10962/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-3.0.0.0-beta1.zip

not related failure in doctest

Comment on lines +36 to +38
public ExprType getExprType() {
return udt.getExprCoreType();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

it is only for backward compatible, right? we will deprecated ExprType in fugure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it doesn't need to get its correspond ExprType after deprecating ExprType. Maybe will return a UDT type name directly here.

@LantaoJin LantaoJin merged commit e325431 into opensearch-project:main Apr 2, 2025
19 of 23 checks passed
penghuo pushed a commit that referenced this pull request Jun 16, 2025
* [Calcite Engine] Support UDT for IP

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

* Fix IT

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

* Refine Code

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

* Refine Code

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

* Address comments

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

calcite calcite migration releated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Calcite Engine: Support IP type

3 participants