[
https://issues.apache.org/jira/browse/CALCITE-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Liya Fan updated CALCITE-4241:
------------------------------
Description:
# For {{RelMdColumnUniqueness#areColumnsUnique(RelSubset, RelMetadataQuery,
ImmutableBitSet, boolean)}}, we can return early as we encounter the first
null.
# For {{RelMdDistinctRowCount#getDistinctRowCount(Values, RelMetadataQuery,
ImmutableBitSet, RexNode)}}, we can get the distinct row count accurately,
instead of guessing that half of the elements are distinct.
# In class {{RelMdUtil}}, {{areColumnsDefinitelyUnique}} and
{{areColumnsDefinitelyUniqueWhenNullsFiltered}} have identical behaviors, so we
should use the formmer, which is more efficient.
was:
# For RelMdColumnUniqueness#areColumnsUnique(RelSubset, RelMetadataQuery,
ImmutableBitSet, boolean), we can return early as we encounter the first null.
# For RelMdDistinctRowCount#getDistinctRowCount(Values, RelMetadataQuery,
ImmutableBitSet, RexNode), we can get the distinct row count accurately,
instead of guessing that half of the elements are distinct.
# In class RelMdUtil, areColumnsDefinitelyUnique and
areColumnsDefinitelyUniqueWhenNullsFiltered have identical behaviors, so we
should use the formmer, which is more efficient.
> Some improvements to metadata query
> -----------------------------------
>
> Key: CALCITE-4241
> URL: https://issues.apache.org/jira/browse/CALCITE-4241
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Liya Fan
> Assignee: Liya Fan
> Priority: Minor
>
> # For {{RelMdColumnUniqueness#areColumnsUnique(RelSubset, RelMetadataQuery,
> ImmutableBitSet, boolean)}}, we can return early as we encounter the first
> null.
> # For {{RelMdDistinctRowCount#getDistinctRowCount(Values, RelMetadataQuery,
> ImmutableBitSet, RexNode)}}, we can get the distinct row count accurately,
> instead of guessing that half of the elements are distinct.
> # In class {{RelMdUtil}}, {{areColumnsDefinitelyUnique}} and
> {{areColumnsDefinitelyUniqueWhenNullsFiltered}} have identical behaviors, so
> we should use the formmer, which is more efficient.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)