HyukjinKwon commented on code in PR #46915:
URL: https://github.com/apache/spark/pull/46915#discussion_r1632101801
##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1131,24 +1131,33 @@ def observe(
def show(self, n: int = 20, truncate: Union[bool, int] = True, vertical:
bool = False) -> None:
print(self._show_string(n, truncate, vertical))
+ def _merge_cached_schema(self, other: ParentDataFrame) ->
Optional[StructType]:
+ # to avoid type coercion, only propagate the schema
+ # when the cached schemas are exactly the same
+ if self._cached_schema is not None and self._cached_schema ==
other._cached_schema:
+ return self.schema
+ return None
Review Comment:
you can just remove this too
--
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]