[
https://issues.apache.org/jira/browse/CALCITE-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249131#comment-16249131
]
weijie.tong commented on CALCITE-1048:
--------------------------------------
[~julianhyde] Since
[CALCITE-794|https://issues.apache.org/jira/browse/CALCITE-794] has solved the
possible stack-overflow problems (If I don't misunderstand that jira.), I think
we could refactor the RelSubset's methods like this:
{code:java}
public Double getMaxRowCount(RelSubset rel, RelMetadataQuery mq) {
Double lowest = Double.POSITIVE_INFINITY;
for (RelNode node : rel.getRels()) {
Double maxRowCount = mq.getMaxRowCount(node);
if (maxRowCount == null) {
continue;
}
if (lowest.compareTo(maxRowCount) > 0) {
lowest = maxRowCount;
}
}
return lowest;
}
{code}
What do you think about this ?
> Make metadata more robust
> -------------------------
>
> Key: CALCITE-1048
> URL: https://issues.apache.org/jira/browse/CALCITE-1048
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
> Following CALCITE-794, make metadata more robust and performant, so we can
> safely derive metadata from a large RelNode graph.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)