BryanCutler commented on a change in pull request #29951:
URL: https://github.com/apache/spark/pull/29951#discussion_r500051665
##########
File path: python/pyspark/sql/tests/test_arrow.py
##########
@@ -264,11 +264,12 @@ def test_createDataFrame_with_schema(self):
def test_createDataFrame_with_incorrect_schema(self):
pdf = self.create_pandas_data_frame()
fields = list(self.schema)
- fields[0], fields[1] = fields[1], fields[0] # swap str with int
+ fields[5], fields[6] = fields[6], fields[5] # swap decimal with date
wrong_schema = StructType(fields)
- with QuietTest(self.sc):
- with self.assertRaisesRegexp(Exception, "integer.*required"):
- self.spark.createDataFrame(pdf, schema=wrong_schema)
+ with
self.sql_conf({"spark.sql.execution.pandas.convertToArrowArraySafely": False}):
Review comment:
The error here is a `TypeError`, but in case it gets changed to an
`ArrowInvalid`, we do not want to have the original error chained because the
assert does not include it when checking
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]