You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Caizhi Weng (Jira)" <ji...@apache.org> on 2020/10/23 08:07:00 UTC
[jira] [Created] (FLINK-19780)
FlinkRelMdDistinctRowCount#getDistinctRowCount(Calc) will always return 0
when number of rows are large
Caizhi Weng created FLINK-19780:
-----------------------------------
Summary: FlinkRelMdDistinctRowCount#getDistinctRowCount(Calc) will always return 0 when number of rows are large
Key: FLINK-19780
URL: https://issues.apache.org/jira/browse/FLINK-19780
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Reporter: Caizhi Weng
Fix For: 1.12.0
Due to CALCITE-4351 {{FlinkRelMdDistinctRowCount#getDistinctRowCount(Calc)}} will always return 0 when number of rows are large.
What I would suggest is to introduce our own {{FlinkRelMdUtil#numDistinctVals}} to treat small and large inputs in different ways. For small inputs we use the more precise {{RelMdUtil#numDistinctVals}} and for large inputs we copy the old, approximated implementation of {{RelMdUtil#numDistinctVals}}.
This is a temporary solution. When CALCITE-4351 is fixed we should revert this commit.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)