[
https://issues.apache.org/jira/browse/CALCITE-4215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17190037#comment-17190037
]
Vladimir Sitnikov commented on CALCITE-4215:
--------------------------------------------
{quote}"We can have two metadata APIs"{quote}
I mean "two methods in RelMetadataQuery" as follows:
{code:java}
public double /* or non-nullable Double ? */ getRowCount(RelNode rel) {
Double result = getRowCountOrNull();
return result != null ? result : 100 /* or get defaults somehow */;
}
public @Nullable Double getRowCountOrNull(RelNode rel) {
for (;;) {
try {
Double result = rowCountHandler.getRowCount(rel, this);
return RelMdUtil.validateResult(result);
} catch (JaninoRelMetadataProvider.NoHandler e) {
rowCountHandler = revise(e.relClass, BuiltInMetadata.RowCount.DEF);
}
}
}
{code}
> Ensure org.apache.calcite.schema.Statistic uses null vs emptyList
> appropriately
> -------------------------------------------------------------------------------
>
> Key: CALCITE-4215
> URL: https://issues.apache.org/jira/browse/CALCITE-4215
> Project: Calcite
> Issue Type: Sub-task
> Components: core
> Affects Versions: 1.25.0
> Reporter: Vladimir Sitnikov
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> null: statistic is *not* *known*
> emptyList: statistic is *known*, and the value is *empty* (e.g. no unique
> keys in the table)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)