You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/06/07 02:32:50 UTC
[GitHub] [spark] HyukjinKwon commented on a change in pull request #24784:
[SPARK-27938][SQL] Remove feature flag LEGACY_PASS_PARTITION_BY_AS_OPTIONS
HyukjinKwon commented on a change in pull request #24784: [SPARK-27938][SQL] Remove feature flag LEGACY_PASS_PARTITION_BY_AS_OPTIONS
URL: https://github.com/apache/spark/pull/24784#discussion_r291435639
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
##########
@@ -225,21 +225,13 @@ class DataFrameReaderWriterSuite extends QueryTest with SharedSQLContext with Be
}
test("pass partitionBy as options") {
- Seq(true, false).foreach { flag =>
- withSQLConf(SQLConf.LEGACY_PASS_PARTITION_BY_AS_OPTIONS.key -> s"$flag") {
- Seq(1).toDF.write
- .format("org.apache.spark.sql.test")
- .partitionBy("col1", "col2")
- .save()
-
- if (flag) {
- val partColumns = LastOptions.parameters(DataSourceUtils.PARTITIONING_COLUMNS_KEY)
- assert(DataSourceUtils.decodePartitioningColumns(partColumns) === Seq("col1", "col2"))
- } else {
- assert(!LastOptions.parameters.contains(DataSourceUtils.PARTITIONING_COLUMNS_KEY))
- }
- }
- }
+ Seq(1).toDF.write
+ .format("org.apache.spark.sql.test")
+ .partitionBy("col1", "col2")
+ .save()
+
+ val partColumns = LastOptions.parameters(DataSourceUtils.PARTITIONING_COLUMNS_KEY)
+ assert(DataSourceUtils.decodePartitioningColumns(partColumns) === Seq("col1", "col2"))
Review comment:
`decodePartitioningColumns` is under `execution` package that's not supposed to be exposed so users shouldn't use this util directly.
Did we document this option to any public datasource v1 API? We should also say this is a JSON string.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org