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

CALCITE-6465: Rework code generator to use Flink code splitter #3901

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

jduo
Copy link
Member

@jduo jduo commented Aug 2, 2024

No description provided.

@jduo
Copy link
Member Author

jduo commented Aug 2, 2024

This builds but introduces a dependency on flink-core. Looking for a way around this.

// more than 8K byte code."
final int flinkDefaultMaxGeneratedCodeLength = 4000;

// From Flink TableConfigOptions.MAX_MEMBERS_GENERATED_CODE
Copy link

@davidradl davidradl Sep 10, 2024

Choose a reason for hiding this comment

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

these Flink considerations seem inappropriate in Calcite, unless we can make them generic so we do not reference Flink at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed references to Flink here.

Integrate Flink Java code splitter and run it on all final Expressions when converting to Java code.

Next step is to run it based on configuration options
JavaCodeSplitter needs it for Preconditions
@jduo jduo marked this pull request as ready for review September 20, 2024 21:08
@@ -51,7 +51,7 @@ public Type getType() {
}

@Override public String toString() {
ExpressionWriter writer = new ExpressionWriter(true);
ExpressionWriter writer = new ExpressionWriter(true, true);
Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally this would read from the CalciteSystemProperty but calcite-core depends on linq4j so it can't be looked up here.

Copy link

sonarcloud bot commented Sep 20, 2024

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.

2 participants