jzhan-2026 commented on code in PR #59814:
URL: https://github.com/apache/spark/pull/59814#discussion_r4447317160
##########
python/pyspark/sql/tests/test_udf_transpile_unit.py:
##########
@@ -1841,6 +1841,33 @@ def test_udf_transpile_udf_as_a_predicate(self):
self.assertGreater(self._eval_python_count(joined), 0,
self._optimized_plan(joined))
self.assertEqual([(4.0, 2.0, 2.0)], [tuple(r) for r in
joined.collect()])
+ def test_udf_transpile_keeps_the_cross_join_guard(self):
+ # SPARK-58780: with cross joins disabled, a UDF that is the only thing
tying a join's sides
+ # together must still fail the query as a cartesian product, as it
does with transpilation
+ # off. Lowered, it read both sides and passed the check, then ran as a
CartesianProduct.
Review Comment:
Thanks @holdenk, agreed. I would keep this PR to restoring the existing
error and do the join key as a follow-up. Filed SPARK-60819 to track it, with
the details.
--
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]