[ 
https://issues.apache.org/jira/browse/SPARK-33949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17258074#comment-17258074
 ] 

Apache Spark commented on SPARK-33949:
--------------------------------------

User 'ulysses-you' has created a pull request for this issue:
https://github.com/apache/spark/pull/31005

> Make approx_count_distinct result consistent whether Optimize rule exists or 
> not
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-33949
>                 URL: https://issues.apache.org/jira/browse/SPARK-33949
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: ulysses you
>            Priority: Minor
>
> This code will fail because folabe value not fold, we should keep result 
> consistent whether Optimize rule exists or not.
> {code:java}
> val excludedRules = Seq(ConstantFolding, 
> ReorderAssociativeOperator).map(_.ruleName)
> withSQLConf(SQLConf.OPTIMIZER_EXCLUDED_RULES.key -> 
> excludedRules.mkString(",")) {
>   sql("select approx_count_distinct(1, 0.01 + 0.02)")
> }{code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to