uros-b opened a new pull request, #57542:
URL: https://github.com/apache/spark/pull/57542

   ### What changes were proposed in this pull request?
   Extracts the two byte-identical explain-mode parsing blocks in Connect's 
`Dataset` (`explain(String)` and `explainString(String)`) into a single private 
`parseExplainMode(mode: String)` helper, and calls it from both sites.
   
   ### Why are the changes needed?
   The seven-line string-to-`ExplainMode` match was duplicated verbatim. 
Factoring it out removes the duplication with no behavior change (same case 
arms, same `"Unsupported explain mode: "` error on the untrimmed input).
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Behavior-preserving refactor; the private helper is exercised by existing 
explain-mode coverage. No new tests needed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Generated-by: Claude Code (Opus 4.8)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to