GideonPotok commented on PR #45738:
URL: https://github.com/apache/spark/pull/45738#issuecomment-2030513193

   @uros-db  
   
   I have some tests, and have substring implementation basically passing tests.
   However, my redefined implementations of Left and Right are failing my 
tests. They are currently throwing the following exceptions in my new test 
cases in CollationSuite.scala:
   
   ```
   [COMPLEX_EXPRESSION_UNSUPPORTED_INPUT.MISMATCHED_TYPES] Cannot process input 
data types for the expression: "(IF((1 <= 0), , substring(collate(klm), (- 1), 
2147483647)))". All input types must be the same except nullable, containsNull, 
valueContainsNull flags, but found the input types ["STRING", "STRING COLLATE 
UTF8_BINARY_LCASE"]. SQLSTATE: 42K09
   ```
   
   I think it is caused by additional work needed on the overridden 
implementation of `replacement` within `Left` and `Right` in 
`stringExpressions.scala`. I think that because the second parameter to Literal 
is DataType in the replacement, rather than AbstractDataType, there is this 
little issue. I think that is what is causing these tests to fail. What do you 
think? Please advise on how to debug this issue.


-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to