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

   ## What changes were proposed in this pull request?
   
   This PR is a no-behavior-change refactor that centralizes join-strategy 
hint-name matching into the `JoinStrategyHint` companion object, making it 
reusable across analyzer rules.
   Specifically:
   - In `hints.scala`:
     - Added the `import java.util.Locale` import.
     - Added a `private lazy val allHintAliasesUpperCase` to the 
`JoinStrategyHint` companion object that collects all hint aliases, upper-cased 
once.
     - Added a `def isJoinStrategyHintName(hintName: String): Boolean` helper 
that checks whether a given hint name matches a join strategy hint 
(case-insensitively).
   - In `ResolveHints.scala`:
     - Removed the local `STRATEGY_HINT_NAMES` val from 
`ResolveJoinStrategyHints`.
     - Updated the `apply` match guard to use the new 
`JoinStrategyHint.isJoinStrategyHintName(h.name)` helper.
   This behavior is preserving: `hintAliases` are already upper-case, so 
folding the upper-casing into `allHintAliasesUpperCase` does not change 
matching.
   
   ## Why are the changes needed?
   
   Centralizing the join-strategy hint-name matching logic removes duplication 
and makes the check reusable by other components (e.g. a single-pass analyzer), 
rather than relying on a rule-local val.
   
   ## Does this PR introduce _any_ user-facing change?
   
   No. This is a no-behavior-change refactor.
   
   ## How was this patch tested?
   
   Existing tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: `claude-opus-4-8-thinking-high`


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