ianmcook commented on code in PR #46529: URL: https://github.com/apache/spark/pull/46529#discussion_r1608275646
########## python/pyspark/sql/connect/session.py: ########## @@ -555,11 +575,21 @@ def createDataFrame( ] ) - if isinstance(schema, StructType): - assert arrow_schema is not None - _table = _table.rename_columns( - cast(StructType, _deduplicate_field_names(schema)).names - ).cast(arrow_schema) + elif isinstance(data, pa.Table): Review Comment: I made these changes because Hyukjin asked me to flatten the if-else logic in this function. See https://github.com/apache/spark/pull/46529#discussion_r1597744517. But I think this makes the PR difficult to review. I will revert this and we can consider doing it in a follow-on PR. -- 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