Skip to content

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

Open
nielspardon wants to merge 1 commit intoapache:mainfrom
nielspardon:par-7447
Open

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

Conversation

@nielspardon
Copy link
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

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