darcy-shen commented on a change in pull request #32332:
URL: https://github.com/apache/spark/pull/32332#discussion_r677042167
##########
File path: python/pyspark/sql/session.py
##########
@@ -681,12 +694,14 @@ def createDataFrame(self, data, schema=None,
samplingRatio=None, verifySchema=Tr
def _create_dataframe(self, data, schema, samplingRatio, verifySchema):
if isinstance(schema, StructType):
+ no_need_to_prepare = not verifySchema
verify_func = _make_type_verifier(schema) if verifySchema else
lambda _: True
def prepare(obj):
verify_func(obj)
return obj
Review comment:
The prepare phase verification only covers when schema `isinstance` of
StructType and DataType.
The conversion phase covers when schema is None and is inferred during the
conversion phase.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]