You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Yunhong Zheng (Jira)" <ji...@apache.org> on 2022/12/13 01:57:00 UTC

[jira] [Created] (CALCITE-5431) Method RelMdUtil$numDistinctVals() wrongly return zero if the method input domainSize is a very large value

Yunhong Zheng created CALCITE-5431:
--------------------------------------

             Summary: Method RelMdUtil$numDistinctVals() wrongly return zero if the method input domainSize is a very large value
                 Key: CALCITE-5431
                 URL: https://issues.apache.org/jira/browse/CALCITE-5431
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.33.0
            Reporter: Yunhong Zheng
             Fix For: 1.33.0


Method {{RelMdUtil$numDistinctVals()}} wrongly return zero if the method input {{domainSize}} is a very large value. If {{domainSize}} is a very large value (like 2 x 10^16), Math.log(1.0 - 1.0 / dSize) will return 0, and {{domainSize}} will be set to 0, which is unreasonable in this scenario.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)