itholic commented on code in PR #46789:
URL: https://github.com/apache/spark/pull/46789#discussion_r1643739251
##########
python/pyspark/sql/tests/test_dataframe_query_context.py:
##########
@@ -41,7 +41,7 @@ def test_dataframe_query_context(self):
error_class="DIVIDE_BY_ZERO",
message_parameters={"config": '"spark.sql.ansi.enabled"'},
query_context_type=QueryContextType.DataFrame,
- pyspark_fragment="divide",
+ fragment="__truediv__",
Review Comment:
I believe this is because the names are different in Python and Scala.
**Python**
https://github.com/apache/spark/blob/f0b7cfa56cb90ef70132d9656299956cbde00b53/python/pyspark/sql/column.py#L115
**Scala**
https://github.com/apache/spark/blob/f0b7cfa56cb90ef70132d9656299956cbde00b53/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/Column.scala#L655
> Can we do the same thing in Python?
I think one way to do this is to add one `dict` into `with_origin` that can
get the name of the Scala function corresponding to the Python function.
--
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]