spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-20281) Table-valued function range in SQL should use the same number of partitions as spark.range
Date Tue, 18 Apr 2017 14:21:41 GMT

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

Apache Spark reassigned SPARK-20281:
------------------------------------

    Assignee:     (was: Apache Spark)

> Table-valued function range in SQL should use the same number of partitions as spark.range
> ------------------------------------------------------------------------------------------
>
>                 Key: SPARK-20281
>                 URL: https://issues.apache.org/jira/browse/SPARK-20281
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Jacek Laskowski
>            Priority: Minor
>
> Note the different number of partitions in {{range}} in SQL and as operator.
> {code}
> scala> spark.range(4).explain
> == Physical Plan ==
> *Range (0, 4, step=1, splits=Some(8)) // <-- note Some(8)
> scala> sql("select * from range(4)").explain
> == Physical Plan ==
> *Range (0, 4, step=1, splits=None) // <-- note None
> {code}
> If I'm not mistaken, the change is to fix {{builtinFunctions}} in {{ResolveTableValuedFunctions}}
(see [https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveTableValuedFunctions.scala#L82-L93])
to use {{sparkContext.defaultParallelism}} as {{SparkSession.range}} (see [https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala#L517]).
> Please confirm to work on a fix if and as needed.



--
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


Mime
View raw message