Github user wesm commented on a diff in the pull request:
https://github.com/apache/spark/pull/19884#discussion_r155647982
--- Diff: python/pyspark/sql/types.py ---
@@ -1658,13 +1657,13 @@ def from_arrow_type(at):
spark_type = FloatType()
elif at == pa.float64():
spark_type = DoubleType()
- elif type(at) == pa.DecimalType:
+ elif pa.types.is_decimal(at):
spark_type = DecimalType(precision=at.precision, scale=at.scale)
- elif at == pa.string():
+ elif pa.types.is_string(at):
spark_type = StringType()
elif at == pa.date32():
spark_type = DateType()
- elif type(at) == pa.TimestampType:
+ elif pa.types.is_timestamp(at):
--- End diff --
https://issues.apache.org/jira/browse/ARROW-1905
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]