itholic commented on code in PR #45377:
URL: https://github.com/apache/spark/pull/45377#discussion_r1557615484
##########
python/pyspark/sql/column.py:
##########
@@ -174,16 +175,48 @@ def _bin_op(
["Column", Union["Column", "LiteralType", "DecimalLiteral",
"DateTimeLiteral"]], "Column"
]:
"""Create a method for given binary operator"""
+ binary_operator_map = {
+ "plus": "+",
+ "minus": "-",
+ "divide": "/",
+ "multiply": "*",
+ "mod": "%",
+ "equalTo": "=",
+ "lt": "<",
+ "leq": "<=",
+ "geq": ">=",
+ "gt": ">",
+ "eqNullSafe": "<=>",
+ "bitwiseOR": "|",
+ "bitwiseAND": "&",
+ "bitwiseXOR": "^",
+ # Just following JVM rule even if the names of source and target are
the same.
+ "and": "and",
+ "or": "or",
+ }
def _(
self: "Column",
other: Union["Column", "LiteralType", "DecimalLiteral",
"DateTimeLiteral"],
) -> "Column":
+ logging_info = {}
+ if name in binary_operator_map:
+ stack = inspect.stack()
+ frame_info = stack[-1]
Review Comment:
Sure, let me address it
--
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]