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 2022/03/14 04:06:28 UTC

[GitHub] [spark] jackylee-ch opened a new pull request #35843: [SPARK-38521][SQL][MINOR] Change partitionOverwriteMode from string to variable

jackylee-ch opened a new pull request #35843:
URL: https://github.com/apache/spark/pull/35843


   ### Why are the changes needed?
   We use `partitionOverwriteMode` in several places, but there is no unified variable definition. This PR is to change all this related modifications to a unified `DataSourceUtils. PARTITION_OVERWRITE_MODE` definition.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Origin UT


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun closed pull request #35843: [SPARK-38521][SQL] Change `partitionOverwriteMode` from string to variable in Scala

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #35843:
URL: https://github.com/apache/spark/pull/35843


   


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] jackylee-ch commented on a change in pull request #35843: [SPARK-38521][SQL][MINOR] Change partitionOverwriteMode from string to variable

Posted by GitBox <gi...@apache.org>.
jackylee-ch commented on a change in pull request #35843:
URL: https://github.com/apache/spark/pull/35843#discussion_r825831621



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -46,6 +46,7 @@ object DataSourceUtils extends PredicateHelper {
    * The key to use for storing partitionBy columns as options.
    */
   val PARTITIONING_COLUMNS_KEY = "__partition_columns"
+  val PARTITION_OVERWRITE_MODE = "partitionOverwriteMode"

Review comment:
       Sure, I will do that




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] huaxingao commented on a change in pull request #35843: [SPARK-38521][SQL][MINOR] Change partitionOverwriteMode from string to variable

Posted by GitBox <gi...@apache.org>.
huaxingao commented on a change in pull request #35843:
URL: https://github.com/apache/spark/pull/35843#discussion_r826157568



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -46,6 +46,11 @@ object DataSourceUtils extends PredicateHelper {
    * The key to use for storing partitionBy columns as options.
    */
   val PARTITIONING_COLUMNS_KEY = "__partition_columns"
+  /**
+   * The key to use for specifying partition overwrite mode when
+   * INSERT OVERWRITE a partitioned data source table.
+   */
+  val PARTITION_OVERWRITE_MODE = "partitionOverwriteMode"

Review comment:
       What is the difference between this `DataSourceUtils.PARTITION_OVERWRITE_MODE` and `SQLConf.PARTITION_OVERWRITE_MODE`?




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #35843: [SPARK-38521][SQL] Change `partitionOverwriteMode` from string to variable in Scala

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #35843:
URL: https://github.com/apache/spark/pull/35843#issuecomment-1067519289


   Merged to master. Thank you, @jackylee-ch and all!


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] jackylee-ch commented on pull request #35843: [SPARK-38521][SQL][MINOR] Change partitionOverwriteMode from string to variable

Posted by GitBox <gi...@apache.org>.
jackylee-ch commented on pull request #35843:
URL: https://github.com/apache/spark/pull/35843#issuecomment-1066481021


   cc @cloud-fan 
   BTW, it seems we support partition overwrite with `static mode` by default while partition manged by catalog. It looks weird to me as `staticmode` behaves catastrophically and deletes all data in table, maybe setting partition overwrite with `dynamic mode` by default while partition manged by catalog?
   If ok, I will open another PR to fix this.


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #35843: [SPARK-38521][SQL] Change partitionOverwriteMode from string to variable

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #35843:
URL: https://github.com/apache/spark/pull/35843#discussion_r826352213



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -46,6 +46,11 @@ object DataSourceUtils extends PredicateHelper {
    * The key to use for storing partitionBy columns as options.
    */
   val PARTITIONING_COLUMNS_KEY = "__partition_columns"
+  /**

Review comment:
       Could you add an empty line before this, @jackylee-ch ?




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] jackylee-ch commented on a change in pull request #35843: [SPARK-38521][SQL] Change `partitionOverwriteMode` from string to variable in Scala

Posted by GitBox <gi...@apache.org>.
jackylee-ch commented on a change in pull request #35843:
URL: https://github.com/apache/spark/pull/35843#discussion_r826502271



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -46,6 +46,11 @@ object DataSourceUtils extends PredicateHelper {
    * The key to use for storing partitionBy columns as options.
    */
   val PARTITIONING_COLUMNS_KEY = "__partition_columns"
+  /**
+   * The key to use for specifying partition overwrite mode when
+   * INSERT OVERWRITE a partitioned data source table.
+   */
+  val PARTITION_OVERWRITE_MODE = "partitionOverwriteMode"

Review comment:
       Basiclly, we will use `DataSourceUtils.PARTITION_OVERWRITE_MODE` if user set `partitionOverwriteMode` in table properties or options. If not, then we will read `SQLConf.PARTITION_OVERWRITE_MODE`.

##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -46,6 +46,11 @@ object DataSourceUtils extends PredicateHelper {
    * The key to use for storing partitionBy columns as options.
    */
   val PARTITIONING_COLUMNS_KEY = "__partition_columns"
+  /**

Review comment:
       Sure




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #35843: [SPARK-38521][SQL][MINOR] Change partitionOverwriteMode from string to variable

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #35843:
URL: https://github.com/apache/spark/pull/35843#discussion_r825786215



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -46,6 +46,7 @@ object DataSourceUtils extends PredicateHelper {
    * The key to use for storing partitionBy columns as options.
    */
   val PARTITIONING_COLUMNS_KEY = "__partition_columns"
+  val PARTITION_OVERWRITE_MODE = "partitionOverwriteMode"

Review comment:
       Can we add short doc for this one?




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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