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 2021/05/12 01:39:44 UTC

[GitHub] [spark] ulysses-you opened a new pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

ulysses-you opened a new pull request #32510:
URL: https://github.com/apache/spark/pull/32510


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error message, please read the guideline first:
        https://spark.apache.org/error-message-guidelines.html
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Override `defaultValue` and change `defaultValueString` to the valid value  in `FallbackConfigEntry`.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Some config use `.fallbackConf` to reference another config but lost the defaultValue.
   
   A negative case is `SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES.defaultValue` would return `None`. It could mislead user.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Yes, user can see the real default value with some configs.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Add test.


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



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


[GitHub] [spark] SparkQA commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839382143


   **[Test build #138415 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138415/testReport)** for PR 32510 at commit [`7f819ea`](https://github.com/apache/spark/commit/7f819ea83270bf95eec7aa346fd2dcdd0a54f1a2).


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



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


[GitHub] [spark] maropu commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839713638


   > A negative case is SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES.defaultValue would return None. It could mislead user.
   
   The default value is related to a user? Since `SQLConf` itself is in the `catalyst` package, it means a private class. So, I think it does not matter to a user.
   


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



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


[GitHub] [spark] SparkQA commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839443187


   **[Test build #138415 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138415/testReport)** for PR 32510 at commit [`7f819ea`](https://github.com/apache/spark/commit/7f819ea83270bf95eec7aa346fd2dcdd0a54f1a2).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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



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


[GitHub] [spark] SparkQA removed a comment on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839382143


   **[Test build #138415 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138415/testReport)** for PR 32510 at commit [`7f819ea`](https://github.com/apache/spark/commit/7f819ea83270bf95eec7aa346fd2dcdd0a54f1a2).


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



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


[GitHub] [spark] ulysses-you commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839652183


   cc @maropu @dongjoon-hyun @HyukjinKwon @Ngone51 


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



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


[GitHub] [spark] ulysses-you commented on a change in pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #32510:
URL: https://github.com/apache/spark/pull/32510#discussion_r630987216



##########
File path: core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala
##########
@@ -264,7 +264,9 @@ private[spark] class FallbackConfigEntry[T] (
     version
   ) {
 
-  override def defaultValueString: String = s"<value of ${fallback.key}>"
+  override def defaultValue: Option[T] = fallback.defaultValue

Review comment:
       yeah, I think we don't need to show the fallback config that might be marked as `Deprecated`.




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



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


[GitHub] [spark] github-actions[bot] closed pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #32510:
URL: https://github.com/apache/spark/pull/32510


   


-- 
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 #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

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



##########
File path: core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala
##########
@@ -264,7 +264,9 @@ private[spark] class FallbackConfigEntry[T] (
     version
   ) {
 
-  override def defaultValueString: String = s"<value of ${fallback.key}>"
+  override def defaultValue: Option[T] = fallback.defaultValue

Review comment:
       Also this will change the docs of configurations (https://spark.apache.org/docs/latest/configuration.html#runtime-sql-configuration) and it won't document that which one is fallback anymore.




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



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


[GitHub] [spark] AmplabJenkins commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839449452


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/138415/
   


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



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


[GitHub] [spark] ulysses-you commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839724551


    @maropu I guess it affects user. 
   
   * the incorrect default value would mislead user.
   * seems there is no other easy way to get the default value of config in code ?


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



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


[GitHub] [spark] AmplabJenkins commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839402590


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42937/
   


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



---------------------------------------------------------------------
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 #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

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


   Thank you for pinging me, @ulysses-you .


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



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


[GitHub] [spark] SparkQA commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839401304






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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839449452


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/138415/
   


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



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


[GitHub] [spark] github-actions[bot] commented on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-903016194


   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
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] AmplabJenkins removed a comment on pull request #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32510:
URL: https://github.com/apache/spark/pull/32510#issuecomment-839402590


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42937/
   


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



---------------------------------------------------------------------
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 #32510: [SPARK-35376][CORE] Fallback config should override defaultValue

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



##########
File path: core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala
##########
@@ -264,7 +264,9 @@ private[spark] class FallbackConfigEntry[T] (
     version
   ) {
 
-  override def defaultValueString: String = s"<value of ${fallback.key}>"
+  override def defaultValue: Option[T] = fallback.defaultValue

Review comment:
       Hm, if the fallback is set, the default value here isn't correct anymore .. right

##########
File path: core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala
##########
@@ -264,7 +264,9 @@ private[spark] class FallbackConfigEntry[T] (
     version
   ) {
 
-  override def defaultValueString: String = s"<value of ${fallback.key}>"
+  override def defaultValue: Option[T] = fallback.defaultValue

Review comment:
       Hm, if the fallback configuration is set, the default value here isn't correct anymore .. right




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



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