[
https://issues.apache.org/jira/browse/CALCITE-6330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827167#comment-17827167
]
mengdou commented on CALCITE-6330:
----------------------------------
[~zabetak] Thanks for your explanation. I agree with you about the fine line
that how many things we can put in the explanation of any operator. Because the
average row size is related to the cost estimation, it makes sense to put it in
there.
> Print the average row size when when explaining an operator
> -----------------------------------------------------------
>
> Key: CALCITE-6330
> URL: https://issues.apache.org/jira/browse/CALCITE-6330
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: mengdou
> Assignee: mengdou
> Priority: Minor
>
> In this time, when we dump the plan of a RelNode Tree, there is no average
> row size exported in the output string, even if
> SqlExplainLevel.ALL_ATTRIBUTES is specified.
> Because the implementation in explain_() in class RelWriterImpl doesn't
> include the metric average_row_size:
>
> {code:java}
> switch (detailLevel) {
> case ALL_ATTRIBUTES:
> s.append(": rowcount = ")
> .append(mq.getRowCount(rel))
> .append(", cumulative cost = ")
> .append(mq.getCumulativeCost(rel));
> }
> switch (detailLevel) {
> case NON_COST_ATTRIBUTES:
> case ALL_ATTRIBUTES:
> if (!withIdPrefix) {
> // If we didn't print the rel id at the start of the line, print
> // it at the end.
> s.append(", id = ").append(rel.getId());
> }
> break;
> } {code}
>
> So I'd like to add this metric by calling md.getAverageRowSize(rel)
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)