ianmcook commented on code in PR #46529: URL: https://github.com/apache/spark/pull/46529#discussion_r1608803682
########## python/pyspark/sql/connect/dataframe.py: ########## @@ -1770,8 +1770,9 @@ def _to_table(self) -> Tuple["pa.Table", Optional[StructType]]: return (table, schema) def toArrow(self) -> "pa.Table": + schema = to_arrow_schema(self.schema, error_on_duplicated_field_names_in_struct=True) table, _ = self._to_table() - return table + return table.cast(schema) Review Comment: This fixes issues with timestamp and struct columns which were introduced in #45481. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org