grundprinzip commented on code in PR #39016:
URL: https://github.com/apache/spark/pull/39016#discussion_r1045160705
##########
python/pyspark/sql/connect/column.py:
##########
@@ -180,7 +186,12 @@ def to_plan(self, session: "SparkConnectClient") ->
"proto.Expression":
elif isinstance(self._value, bool):
expr.literal.boolean = bool(self._value)
elif isinstance(self._value, int):
- expr.literal.long = int(self._value)
+ if JVM_INT_MIN <= self._value <= JVM_INT_MAX:
Review Comment:
I'm sorry for commenting on this so late and it's not blocking the PR.
Can we quickly check what the behavior for Py4j is when it comes to sending
numeric values to the JVM? Will a Python int in the byte or short range be
automatically converted to this type?
The reason I'm wondering is if we have expressions that take a short
argument will we have the same problem?
Thanks
--
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]