You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/17 19:25:29 UTC
[GitHub] [spark] ueshin commented on a change in pull request #34614: [SPARK-37279][PYTHON][SQL] Support DayTimeIntervalType in createDataFrame, collect and Python UDF
ueshin commented on a change in pull request #34614:
URL: https://github.com/apache/spark/pull/34614#discussion_r751566309
##########
File path: python/pyspark/sql/types.py
##########
@@ -1034,11 +1096,17 @@ def _parse_datatype_json_value(json_value: Union[dict, str]) -> DataType:
return _all_atomic_types[json_value]()
elif json_value == "decimal":
return DecimalType()
- elif json_value == "timestamp_ntz":
- return TimestampNTZType()
elif _FIXED_DECIMAL.match(json_value):
m = _FIXED_DECIMAL.match(json_value)
return DecimalType(int(m.group(1)), int(m.group(2))) # type: ignore[union-attr]
+ elif _INTERVAL_DAYTIME.match(json_value):
+ m = _INTERVAL_DAYTIME.match(json_value)
+ inverted_fields = DayTimeIntervalType._inverted_fields # type: ignore[union-attr]
Review comment:
nit: we don't need the ignore here.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org