Skip to content
Prev Previous commit
Next Next commit
restore connect
  • Loading branch information
xinrong-meng committed Nov 14, 2024
commit 95319377883dee3fbd51385e9a27103802f60019
9 changes: 1 addition & 8 deletions python/pyspark/sql/connect/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,16 +611,9 @@ def createDataFrame(
if not isinstance(schema, StructType):
schema = from_arrow_schema(data.schema, prefer_timestamp_ntz=prefer_timestamp_ntz)

safe_cast = (
self._client.get_configs("spark.sql.execution.castArrowTableSafely") == "true"
)

_table = (
_check_arrow_table_timestamps_localize(data, schema, True, timezone)
.cast(
to_arrow_schema(schema, error_on_duplicated_field_names_in_struct=True),
safe=safe_cast,
)
.cast(to_arrow_schema(schema, error_on_duplicated_field_names_in_struct=True))
.rename_columns(schema.names)
)

Expand Down