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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to