BryanCutler commented on a change in pull request #22807:
[SPARK-25811][PySpark] Raise a proper error when unsafe cast is detected by
PyArrow
URL: https://github.com/apache/spark/pull/22807#discussion_r246217682
##########
File path: python/pyspark/sql/session.py
##########
@@ -556,8 +556,10 @@ def _create_from_pandas_with_arrow(self, pdf, schema,
timezone):
pdf_slices = (pdf[start:start + step] for start in xrange(0, len(pdf),
step))
# Create Arrow record batches
+ runner_conf = {"spark.sql.execution.pandas.arrowSafeTypeConversion":
+ self._wrapped._conf.arrowSafeTypeConversion()}
batches = [_create_batch([(c, t) for (_, c), t in
zip(pdf_slice.iteritems(), arrow_types)],
- timezone)
+ timezone, runner_conf)
Review comment:
here, it doesn't really make sense to use a `runner_conf`, so it would be
better to just pass in the flag
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]