[ 
https://issues.apache.org/jira/browse/FLINK-21946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lincoln lee updated FLINK-21946:
--------------------------------
    Description: 
CALCITE-4351 introduced a new 'more accurate' formula for estimating the number 
of distinct values, FLINK-19780 fixed one bad case when number of rows are 
large, but still there's exception path when domainSize is in range(0,1), the 
following code in calcite‘s  RelMdUtil.numDistinctVals will produce Double.NaN 
result:
{code}double expo = numSel * Math.log(1.0 - 1.0 / dSize);{code}

Before CALCITE-4351 was fixed, we should continue the fixing in flink.

  was:
CALCITE-4351 introduced a new 'more accurate' formula for estimating the number 
of distinct values, FLINK-19780 fixed one bad case when number of rows are 
large, but still there's exception path when domainSize is in range(0,1), the 
following code in calcite‘s  will produce Double.NaN result:
{code}double expo = numSel * Math.log(1.0 - 1.0 / dSize);{code}



> FlinkRelMdUtil.numDistinctVals produces exceptional Double.NaN result  when 
> domainSize is in range(0,1)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-21946
>                 URL: https://issues.apache.org/jira/browse/FLINK-21946
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.11.3, 1.12.2
>            Reporter: lincoln lee
>            Priority: Minor
>             Fix For: 1.13.0
>
>
> CALCITE-4351 introduced a new 'more accurate' formula for estimating the 
> number of distinct values, FLINK-19780 fixed one bad case when number of rows 
> are large, but still there's exception path when domainSize is in range(0,1), 
> the following code in calcite‘s  RelMdUtil.numDistinctVals will produce 
> Double.NaN result:
> {code}double expo = numSel * Math.log(1.0 - 1.0 / dSize);{code}
> Before CALCITE-4351 was fixed, we should continue the fixing in flink.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to