HyukjinKwon commented on a change in pull request #27565: [SPARK-30791]
Dataframe add sameSemantics and sementicHash method
URL: https://github.com/apache/spark/pull/27565#discussion_r379229959
##########
File path: python/pyspark/sql/dataframe.py
##########
@@ -2153,6 +2153,22 @@ def transform(self, func):
"should have been DataFrame." %
type(result)
return result
+ @since(3.0)
+ def sameSemantics(self, other):
+ """
+ Return true when the query plan of the given :class:`DataFrame` will
return the same
+ results as this :class:`DataFrame`.
+ """
+ return self._jdf.sameSemantics(other)
Review comment:
Since Python API side does not check the type, we could add an if-else with
throwing `ValueError`.
```python
if not isinstance(other, DataFrame):
raise ValueError("other parameter should be of DataFrame; however, got
%s" % type(other))
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]