You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/05/03 22:35:04 UTC

[jira] [Commented] (SPARK-20586) Add deterministic and distinctLike to ScalaUDF

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

Apache Spark commented on SPARK-20586:
--------------------------------------

User 'gatorsmile' has created a pull request for this issue:
https://github.com/apache/spark/pull/17848

> Add deterministic and distinctLike to ScalaUDF
> ----------------------------------------------
>
>                 Key: SPARK-20586
>                 URL: https://issues.apache.org/jira/browse/SPARK-20586
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Xiao Li
>            Assignee: Xiao Li
>
> https://hive.apache.org/javadocs/r2.0.1/api/org/apache/hadoop/hive/ql/udf/UDFType.html
> Like Hive UDFType, we should allow users to add the extra flags for ScalaUDF too. {{stateful}}/{{impliesOrder}} are not applicable to ScalaUDF. Thus, we only add the following two flags. 
> - deterministic: Certain optimizations should not be applied if UDF is not deterministic. Deterministic UDF returns same result each time it is invoked with a particular input. This determinism just needs to hold within the context of a query.
> - distinctLike: A UDF is considered distinctLike if the UDF can be evaluated on just the distinct values of a column. Examples include min and max UDFs. This information is used by metadata-only optimizer.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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