Yikun opened a new pull request, #36391: URL: https://github.com/apache/spark/pull/36391
### What changes were proposed in this pull request? - This patch passes the array rather than index to follow pandas behaviors. - Fix `test_multi_index_dtypes_not_unique_name` test (regression for changes with pandas 1.4.x) - Add `test_multi_index_dtypes_not_unique_name` test (it's not a regression for changes, just a plus and validation on https://github.com/pandas-dev/pandas/commit/d06fb912782834125f1c9b0baaea1d60f2151c69) ### Why are the changes needed? Pandas are using [array as series index input](https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexes/multi.py#L760-L767), thus [infer original info](https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexes/base.py#L7271-L7284) from array. We'd better to keep same. Pandas introduce the commits https://github.com/pandas-dev/pandas/commit/d06fb912782834125f1c9b0baaea1d60f2151c69 since 1.4.0, it changes the dtypes behavior of `list[tuple]` as index. ### Does this PR introduce _any_ user-facing change? Yep, follow pandas behavior ### How was this patch tested? - UT passed. - `test_multi_index_dtypes_not_unique_name`, `test_multi_index_dtypes` passed with 1.4.x + -- 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]
