Skip to content
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

IGNITE-23745 SQL Calcite: Add ability to extend SQL engine with new system functions/operators #11684

Closed
wants to merge 9 commits into from

Conversation

alex-plekhanov
Copy link
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.

}

@Override public void start(PluginContext ctx) {
IgniteOwnSqlOperatorTable.instance().register(SUBSTR);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to extend a default operator, IgniteOwnSqlOperatorTable should go first in FrameworkConfig (CalciteQueryProcessor#FRAMEWORK_CONFIG). Otherwise, filtering operator overload by strict operands types isn't reliable. Operand types might not be consedered in SqlUtil#filterRoutinesByParameterTypeAndName()

@@ -53,6 +54,16 @@ private IgniteConvertletTable() {
addAlias(IgniteOwnSqlOperatorTable.LENGTH, SqlStdOperatorTable.CHAR_LENGTH);
}

/** {@inheritDoc} */
@Override public void registerOp(SqlOperator op, SqlRexConvertlet convertlet) {
super.registerOp(op, convertlet);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to extend a default operator, we should take in account overriding a default converter like StandardConvertletTable#convertPlus(..).

@asfgit asfgit closed this in 21f6b88 Dec 5, 2024
luchnikovbsk pushed a commit to luchnikovbsk/ignite that referenced this pull request Jan 31, 2025
…ystem functions/operators - Fixes apache#11684.

Signed-off-by: Aleksey Plekhanov <[email protected]>
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.

3 participants