[FLINK-11788][table-planner-blink] Support Code Generation for RexNode#7982
Closed
wuchong wants to merge 1 commit intoapache:masterfrom
Closed
[FLINK-11788][table-planner-blink] Support Code Generation for RexNode#7982wuchong wants to merge 1 commit intoapache:masterfrom
wuchong wants to merge 1 commit intoapache:masterfrom
Conversation
Collaborator
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
KurtYoung
reviewed
Mar 15, 2019
| import org.apache.calcite.rex.RexLocalRef | ||
| import org.apache.flink.table.`type`.InternalType | ||
|
|
||
| case class RexAggBufferVariable( |
Contributor
There was a problem hiding this comment.
Could you add some comments to these newly introduced variables to explain what these are used for?
Contributor
|
+1 to merge |
1. Introduce ExprCodeGenerator to generate code for RexNodes 2. Introduce SqlOperatorGens to generate code for SQL scalar operators 3. Introduce GenerateUtils to generate code for general purpose, e.g. generateLiteral, generateFieldAccess This closes apache#7982
Member
Author
|
Rebased and squashed. Waiting travis to turn green... |
HuangZhenQiu
pushed a commit
to HuangZhenQiu/flink
that referenced
this pull request
Mar 20, 2019
1. Introduce ExprCodeGenerator to generate code for RexNodes 2. Introduce SqlOperatorGens to generate code for SQL scalar operators 3. Introduce GenerateUtils to generate code for general purpose, e.g. generateLiteral, generateFieldAccess This closes apache#7982
HuangZhenQiu
pushed a commit
to HuangZhenQiu/flink
that referenced
this pull request
Apr 22, 2019
1. Introduce ExprCodeGenerator to generate code for RexNodes 2. Introduce SqlOperatorGens to generate code for SQL scalar operators 3. Introduce GenerateUtils to generate code for general purpose, e.g. generateLiteral, generateFieldAccess This closes apache#7982
sunhaibotb
pushed a commit
to sunhaibotb/flink
that referenced
this pull request
May 8, 2019
1. Introduce ExprCodeGenerator to generate code for RexNodes 2. Introduce SqlOperatorGens to generate code for SQL scalar operators 3. Introduce GenerateUtils to generate code for general purpose, e.g. generateLiteral, generateFieldAccess This closes apache#7982
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This is the basic implementation to support code generation for RexNodes.
Brief change log
Flink/Blink's code generation is not clean and the
generate....methods is existed in various util class (e.g.CodeGenUtils,BinaryStringCallGen,CallGenerator,ScalarOperators...). This pull request does some code cleanup to put the generations into a new structure.All the
generate....methods are split and placed into only 2 util classes.GenerateUtils: generate code for general purpose, e.g.generateCallIfArgsNotNull,generateFieldAccess,generateLiteral. It can be used in variousCodeGenerator.SqlOperatorGens: generate code for SQL scalar operators, e.g. arithmetic operator. It is mostly used inExprCodeGenerator.Some other classes are:
CallGeneratorinterface: generate a call, usually used when the generation depends on some additional parameters.CodeGenUtils: a utility for codegen, e.g.newName,primitiveTypeTermForType, but not includegenerate...methods.ExprCodeGenerator: responsible for generating codes for a given calciteRexNode.CodeGeneratorContext: context for code generator, maintaining various reusable statementsVerifying this change
Add a
ExpressionTestBasebase class to check the code generation for expressions(RexNode).We introduce 5 expression validation test class and 9 expression test class.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation