LuciferYang commented on PR #59300:
URL: https://github.com/apache/spark/pull/59300#issuecomment-6116980772

   > Thanks for the PR, @LuciferYang!
   > 
   > The `prefix%suffix` rewrite is the only one in `simplifyLike` that reads 
the input more than once. With the guard, a nondeterministic input falls 
through to `case _ => None` and keeps the `LIKE`. The `LIKE ALL` / `LIKE ANY` 
paths were already safe. `CollapseProject.isCheap` lets a nondeterministic 
input through only as a Python UDF, and `ExtractPythonUDFs` maps all its copies 
to one result. The new test fails at its first assertion with the old rule, and 
the suite passes here.
   > 
   > ### Minor
   > * **1.** _JIRA affected versions:_ 
[SPARK-60028](https://issues.apache.org/jira/browse/SPARK-60028) lists only the 
unreleased 5.0.0, but `branch-3.5` through `branch-4.2` have the same rewrite 
(with `Length`). So the affected versions are 3.5.8, 4.0.4, 4.1.3 and 4.2.0. As 
a wrong-results bug, it should also get the `correctness` label.
   
   I will submit separate PRs for other branches.


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