HyukjinKwon commented on code in PR #37564:
URL: https://github.com/apache/spark/pull/37564#discussion_r948918084
##########
python/pyspark/pandas/frame.py:
##########
@@ -455,10 +456,14 @@ def __init__( # type: ignore[no-untyped-def]
from pyspark.pandas.indexes.base import Index
if isinstance(index, Index):
- raise TypeError(
- "The given index cannot be a pandas-on-Spark index. "
- "Try pandas index or array-like."
- )
+ if get_option("compute.ops_on_diff_frames"):
+ index = index.to_pandas()
Review Comment:
I think we should probably create pandas-on-Spark DataFrame with joining
(e.g., df1 + df2 when `compute.ops_on_diff_frames` is on) instead of collecting
it to the driver side.
--
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]