zhengruifeng commented on code in PR #52058:
URL: https://github.com/apache/spark/pull/52058#discussion_r2281309374
##########
python/pyspark/sql/types.py:
##########
@@ -2148,7 +2148,7 @@ def _assert_valid_collation_provider(provider: str) ->
None:
decimal.Decimal: DecimalType,
datetime.date: DateType,
datetime.datetime: TimestampType, # can be TimestampNTZType
- datetime.time: TimestampType, # can be TimestampNTZType
+ datetime.time: TimeType,
Review Comment:
The inferred type of `datetime.time` will be `TimeType`.
But I think it is not a behavior change, since `datetime.time` is never a
accepted type for `TimestampType`
https://github.com/apache/spark/blob/19ea6ff95ef334cf9655c6b29b5a0123ebf58d87/python/pyspark/sql/types.py#L2687-L2690
manually check that createDF with `datetime.time` never work before
--
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]