-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[FLINK-11854] [table-planner-blink] Introduce batch physical nodes #7931
Conversation
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. The 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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, i left some comments
} | ||
|
||
public static boolean isMutable(InternalType type) { | ||
return MUTABLE_FIELD_TYPES.contains(type) || type instanceof DecimalType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we also need to check Decimal's precision just like isFixedLength
does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No matter how precision is, it is mutable.
Precision is compact, Decimal is stored in 8 bytes in fix-length-part.
Precision is not compact, Decimal is stored in 16 bytes in var-length-part.
It can always be update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method isFixedLength should be isInFixedLengthPart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just add the dicimal type to the MUTABLE_FIELD_TYPES, and give some explainations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dicimal type can not be added into MUTABLE_FIELD_TYPES. Because its instance is not unique, but it has different instances for different precision
or scale
value.
*/ | ||
object ExpandUtil { | ||
|
||
def projectsToString( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try to move all methods like these to one util class? Various logical or physical operators will share some name formatting utilities. There will be a lot repetition if we organize it by operator.
/** | ||
* Utility methods for RelNode. | ||
*/ | ||
object RelNodeUtil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this utility class should focus on operator name formatting, things like compute cost should be operator specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, this class name is also too big
@KurtYoung @JingsongLi I have updated this pr based on the comments. |
Looks like there are some compilation errors |
extends Calc(cluster, traitSet, input, calcProgram) | ||
with FlinkRelNode { | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete extra blank line
.itemIf("where", conditionToString(), calcProgram.getCondition != null) | ||
} | ||
|
||
protected def conditionToString(): String = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to RelExplainUtil
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method is only used in this class
} | ||
} | ||
|
||
protected def projectionToString( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
.item("distribution", distributionToString()) | ||
} | ||
|
||
private def distributionToString(): String = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
length | ||
} | ||
|
||
def computeSortMemory(mq: RelMetadataQuery, inputOfSort: RelNode): Double = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should place this method here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move binaryRowAverageSize
and computeSortMemory
methods into FlinkRelMdUtil
class
} | ||
|
||
public static boolean isMutable(InternalType type) { | ||
return MUTABLE_FIELD_TYPES.contains(type) || type instanceof DecimalType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just add the dicimal type to the MUTABLE_FIELD_TYPES, and give some explainations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KurtYoung I have updated this pr.
LGTM, merging.. |
What is the purpose of the change
Introduce batch physical nodes
Brief change log
BatchExecCorrelate
,BatchExecTemporalTableJoin
, BatchExecXXXWindowAggregateVerifying this change
This change is an initialization work without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation