You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ForVic (via GitHub)" <gi...@apache.org> on 2024/03/16 00:09:36 UTC

[PR] [DON'T REVIEW NOT COMPLETE] Add new ExplainMode - SilentMode [spark]

ForVic opened a new pull request, #45542:
URL: https://github.com/apache/spark/pull/45542

   <!--
   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 type or message, please read the guideline first in
        'common/utils/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   I've added a new ExplainMode, SilentMode, which allows us to use EXPLAIN or .explainString without any output.
   
   
   ### Why are the changes needed?
   While investigating unit test duration we found that org.apache.spark.sql.execution.QueryExecution.explainString () takes approximately 14% time. This method generates the string representation of the execution plan. The string is often used for logging purposes. This is also called for each AQE job so it can save prod execution time too. While SPARK-44485 does exist to help optimize the prod execution time, the main purpose of this PR is to save time during unit testing.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   
   ### How was this patch tested?
   A couple new unit tests + existing.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


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


Re: [PR] [SPARK-47445][CONNECT] Add new ExplainMode - SilentMode [spark]

Posted by "robreeves (via GitHub)" <gi...@apache.org>.
robreeves commented on code in PR #45542:
URL: https://github.com/apache/spark/pull/45542#discussion_r1529263325


##########
connector/connect/common/src/main/protobuf/spark/connect/base.proto:
##########
@@ -125,6 +125,9 @@ message AnalyzePlanRequest {
 
       // Generates a physical plan outline and also node details.
       EXPLAIN_MODE_FORMATTED = 5;
+
+      // Does not generate any plan when used.
+      EXPLAIN_MODE_SILENT = 6;

Review Comment:
   nit: Disabled feels more intuitive to me than silent for the naming.
   ```suggestion
         EXPLAIN_MODE_DISABLED = 6;
   ```



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


Re: [PR] [SPARK-47445][CONNECT] Add new ExplainMode - SilentMode [spark]

Posted by "ForVic (via GitHub)" <gi...@apache.org>.
ForVic commented on code in PR #45542:
URL: https://github.com/apache/spark/pull/45542#discussion_r1529420300


##########
connector/connect/common/src/main/protobuf/spark/connect/base.proto:
##########
@@ -125,6 +125,9 @@ message AnalyzePlanRequest {
 
       // Generates a physical plan outline and also node details.
       EXPLAIN_MODE_FORMATTED = 5;
+
+      // Does not generate any plan when used.
+      EXPLAIN_MODE_SILENT = 6;

Review Comment:
   Are you referring to everywhere, or just here? I'm fine with changing it everywhere, but if that's not the suggestion I think we should keep all references to that mode the same.



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