zhengruifeng commented on code in PR #54568:
URL: https://github.com/apache/spark/pull/54568#discussion_r2871961846
##########
python/pyspark/sql/tests/test_udf.py:
##########
@@ -1679,7 +1679,7 @@ def test_udf_with_pyspark_logger(self):
@udf
def my_udf(x):
logger = PySparkLogger.getLogger("PySparkLogger")
- logger.warning("PySparkLogger test", x=x)
+ logger.warning("PySparkLogger test", x=str(x))
Review Comment:
this test fails
https://github.com/zhengruifeng/spark/actions/runs/22566466865/job/65363804340
```
! Row(level='ERROR', msg='Traceback (most recent call last):',
context={'func_name': 'my_udf'}, logger='stderr')
! Row(level='ERROR', msg='Traceback (most recent call last):',
context={'func_name': 'my_udf'}, logger='stderr')
! Row(level='ERROR', msg='TypeError: Object of type int64 is not JSON
serializable', context={'func_name': 'my_udf'}, logger='stderr')
! Row(level='ERROR', msg='TypeError: Object of type int64 is not JSON
serializable', context={'func_name': 'my_udf'}, logger='stderr')
```
I guess we need some fix in udf logging
--
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]