zhengruifeng commented on code in PR #37564:
URL: https://github.com/apache/spark/pull/37564#discussion_r949701378
##########
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 am still a lit confused:
do you mean this?
1. parallelize data;
2. attach a `temp_index` with `AttachDistributedSequence` or `zipWithIndex`
for both data and ps.Index;
3. inner join on the `temp_index`
--
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]