cloud-fan commented on code in PR #43360:
URL: https://github.com/apache/spark/pull/43360#discussion_r1363410031
##########
python/pyspark/sql/readwriter.py:
##########
@@ -151,8 +173,10 @@ def schema(self, schema: Union[StructType, str]) ->
"DataFrameReader":
if isinstance(schema, StructType):
jschema = spark._jsparkSession.parseDataType(schema.json())
self._jreader = self._jreader.schema(jschema)
+ self._schema = schema
Review Comment:
why do we put it in both if and else instead of putting it after if-else
only once?
--
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]