allisonwang-db commented on code in PR #43360:
URL: https://github.com/apache/spark/pull/43360#discussion_r1364731275


##########
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:
   I got a Mypy error. I will refactor the way to store this info: 
[SPARK-45600](https://issues.apache.org/jira/browse/SPARK-45600)



-- 
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]

Reply via email to