viirya commented on pull request #32559: URL: https://github.com/apache/spark/pull/32559#issuecomment-843648970
> I did actually hit a bug today where the when value was being evaluated even though the condition was false. I wasn't able to find the exact root cause yet but turning off subexpression elimination fixed the issue. It was basically `when(col.rlike(...), udf(col))`, but more complex on both sides so somehow the UDF was getting subexpression eval'd early and failed because it didn't match the regular expression I see. Normally, for catalyst expressions, it is performance issue only. But for UDF, we cannot expect the logic put in UDF by users. It is possibly the UDF fails unexpectedly in such cases. So looks like it is better to backport it as a bug fix. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
