You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2024/10/13 11:44:40 UTC

[PR] [PS][CONNECT] Add alias for `distributed_id` [spark]

zhengruifeng opened a new pull request, #48439:
URL: https://github.com/apache/spark/pull/48439

   ### What changes were proposed in this pull request?
   1, make `registerInternalExpression` support alias;
   2, add alias `distributed_id` for `MonotonicallyIncreasingID`;
   3, remove `distributedIndex` from `PythonSQLUtils`
   
   
   ### Why are the changes needed?
   make PS on Connect more consistent with Classic:
   
   ```py
   In [9]: ps.set_option("compute.default_index_type", "distributed")
   In [10]: spark_frame = ps.range(10).to_spark()
   In [11]: InternalFrame.attach_default_index(spark_frame).explain(True)
   ```
   
   before:
   ![image](https://github.com/user-attachments/assets/6ce1fb5f-a3c6-42d5-a21e-3925207cb4d0)
   
   ```
   == Parsed Logical Plan ==
   'Project ['monotonically_increasing_id() AS __index_level_0__#27, 'id]
   +- 'Project ['id]
      +- Project [__index_level_0__#19L, id#16L, monotonically_increasing_id() AS __natural_order__#22L]
         +- Project [monotonically_increasing_id() AS __index_level_0__#19L, id#16L]
            +- Range (0, 10, step=1, splits=Some(12))
   ...
   ```
   
   after:
   ![image](https://github.com/user-attachments/assets/00d3a8a1-251c-4cee-851e-c10f294d5248)
   ```
   == Parsed Logical Plan ==
   'Project ['distributed_id() AS __index_level_0__#65, *]
   +- 'Project ['id]
      +- Project [__index_level_0__#45L, id#42L, monotonically_increasing_id() AS __natural_order__#48L]
         +- Project [distributed_id() AS __index_level_0__#45L, id#42L]
            +- Range (0, 10, step=1, splits=Some(12))
   ...
   ```
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   spark ui
   
   
   ### How was this patch tested?
   existing test and manually check
   
   ### Was this patch authored or co-authored using generative AI tooling?
   no
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-49945][PS][CONNECT] Add alias for `distributed_id` [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #48439:
URL: https://github.com/apache/spark/pull/48439#issuecomment-2418361198

   Merged to master.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-49945][PS][CONNECT] Add alias for `distributed_id` [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #48439: [SPARK-49945][PS][CONNECT] Add alias for `distributed_id`
URL: https://github.com/apache/spark/pull/48439


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org