You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Pavel Parkhomenko (Jira)" <ji...@apache.org> on 2019/09/10 03:57:00 UTC
[jira] [Reopened] (SPARK-29004) DataFrameWriter.save does not work
with bucketBy [and sortBy]
[ https://issues.apache.org/jira/browse/SPARK-29004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Parkhomenko reopened SPARK-29004:
---------------------------------------
It is not mentioned in documentation that I should use only saveAsTable. Moreover, there is written:
_This is applicable for all file-based data sources (e.g. Parquet, JSON) starting with Spark 2.1.0. _
Also
_If specified, the output is laid out on the file system similar to Hive's bucketing scheme._
"similar to Hive" does not mean "Hive only".
If it is Hive only feature, please, mention it in the documentation. Or fix it for all saves.
Thank you.
> DataFrameWriter.save does not work with bucketBy [and sortBy]
> -------------------------------------------------------------
>
> Key: SPARK-29004
> URL: https://issues.apache.org/jira/browse/SPARK-29004
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 2.4.4
> Reporter: Pavel Parkhomenko
> Priority: Major
>
> bucketBy (and sortBy) does not work in DataFrameWriter at least for JSON (seems like it does not work for all file-based data sources) despite the documentation:
> {noformat}
> This is applicable for all file-based data sources (e.g. Parquet, JSON) starting with Spark 2.1.0.{noformat}
> https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.sql.DataFrameWriter@bucketBy(numBuckets:Int,colName:String,colNames:String*):org.apache.spark.sql.DataFrameWriter[T]
> Probably the issue is here: https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala#L253
> Or the documentation is wrong and bucketBy is not supported for file based sources.
>
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org