Skip to content

[CALCITE-6303] UNION with CTE(s) results in exception during query va…#4158

Merged
NobiGo merged 1 commit intoapache:mainfrom
NobiGo:CALCITE-6303
Jan 23, 2025
Merged

[CALCITE-6303] UNION with CTE(s) results in exception during query va…#4158
NobiGo merged 1 commit intoapache:mainfrom
NobiGo:CALCITE-6303

Conversation

@NobiGo
Copy link
Copy Markdown
Contributor

@NobiGo NobiGo commented Jan 22, 2025

…lidation

// STREAM * FROM KAFKA.MOCKTABLE
// SELET STREAM * FROM STREMTABLE
// The modality should be STREAM.
validateModality(((SqlWith) query).body);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I came up with an execution plan based on SQL. The first SQL generated plan is a regular TableScan, and the second SQl generated plan is a Stream TableScan. So I think it is up to its body.

Comment thread core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java Outdated
Comment thread core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java Outdated
Copy link
Copy Markdown
Contributor

@ILuffZhe ILuffZhe left a comment

Choose a reason for hiding this comment

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

LGTM

@NobiGo NobiGo added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jan 23, 2025
Comment thread core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java Outdated
@sonarqubecloud
Copy link
Copy Markdown

@NobiGo NobiGo merged commit 28e0ab2 into apache:main Jan 23, 2025
@NobiGo NobiGo deleted the CALCITE-6303 branch March 8, 2025 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants