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: [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]

Reply via email to