This is an automated email from the ASF dual-hosted git repository.

dongjoon-hyun pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new 7ff50f67fd99 [SPARK-60729][SQL] Remove duplicate `FindInSet` in 
`CollationTypeCoercion.canContainIndeterminateCollation`
7ff50f67fd99 is described below

commit 7ff50f67fd9962d1a6ffe321fd9b374c25d7a763
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Oct 29 17:16:04 2026 -0700

    [SPARK-60729][SQL] Remove duplicate `FindInSet` in 
`CollationTypeCoercion.canContainIndeterminateCollation`
    
    ### What changes were proposed in this pull request?
    
    This PR removes the duplicate `_: FindInSet` alternative from 
`CollationTypeCoercion.canContainIndeterminateCollation`. `FindInSet` is 
already matched earlier in the same pattern.
    
    ### Why are the changes needed?
    
    The second alternative can never match. It was added together with `_: In` 
while SPARK-50522 (#49103) was being developed. Removing it keeps the list of 
expressions that reject indeterminate collation accurate.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No. The pattern match result is unchanged.
    
    ### How was this patch tested?
    
    Pass the CIs. The existing `IndeterminateCollationTestSuite` and 
`collations-string-functions.sql` golden tests still verify that `find_in_set` 
fails at analysis with `INDETERMINATE_COLLATION_IN_EXPRESSION`.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 5.5
    
    Closes #59936 from dongjoon-hyun/SPARK-60729.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit a8e363406b20c61104a04d29e2cac07488f82067)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../org/apache/spark/sql/catalyst/analysis/CollationTypeCoercion.scala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCoercion.scala
 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCoercion.scala
index a16b00322b44..902d88f75938 100644
--- 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCoercion.scala
+++ 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCoercion.scala
@@ -540,8 +540,7 @@ object CollationTypeCoercion extends SQLConfHelper {
     case _: BinaryComparison | _: StringPredicate | _: Upper | _: Lower | _: 
InitCap |
          _: FindInSet | _: StringInstr | _: StringReplace | _: StringLocate | 
_: SubstringIndex |
          _: StringTrim | _: StringTrimLeft | _: StringTrimRight | _: 
StringTranslate |
-         _: StringSplitSQL | _: In | _: InSubquery | _: FindInSet |
-         _: StringInstrWithOccurrence => false
+         _: StringSplitSQL | _: In | _: InSubquery | _: 
StringInstrWithOccurrence => false
     case _ => true
   }
 


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

Reply via email to