Skip to content

[CALCITE-7447] RelRoot.project() adds Project for DDL nodes#4841

Merged
caicancai merged 1 commit intoapache:mainfrom
nielspardon:par-7447
Mar 22, 2026
Merged

[CALCITE-7447] RelRoot.project() adds Project for DDL nodes#4841
caicancai merged 1 commit intoapache:mainfrom
nielspardon:par-7447

Conversation

@nielspardon
Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7447

Changes Proposed

While Calcite does not officially have DDL RelNodes we are extending Calcite in substrait-java to be able to work with DDL operations as RelNodes.

When we then use the RelRoot.project(true) function to access the RelRoot.rel these DDL operations are currently getting wrapped in a LogicalProject which obviously does not make sense.

Since the code in RelRoot.project() already checks whether the RelRoot.kind is a DML operation we can simply also check whether it is a DDL operation to avoid falsely wrapping those operations in a LogicalProject.

Signed-off-by: Niels Pardon <par@zurich.ibm.com>
@sonarqubecloud
Copy link
Copy Markdown

@caicancai caicancai merged commit 7f99701 into apache:main Mar 22, 2026
20 checks passed
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.

4 participants