HyukjinKwon opened a new pull request, #42693: URL: https://github.com/apache/spark/pull/42693
### What changes were proposed in this pull request? This PR fixes the bug in createDataFrame with Python Spark Connect client. Now it respects inherited namedtuples as below: ```python from collections import namedtuple MyTuple = namedtuple("MyTuple", ["zz", "b", "a"]) class MyInheritedTuple(MyTuple): pass df = spark.createDataFrame([MyInheritedTuple(1, 2, 3), MyInheritedTuple(11, 22, 33)]) df.collect() ``` Before: ``` [Row(zz=None, b=None, a=None), Row(zz=None, b=None, a=None)] ``` After: ``` [Row(zz=1, b=2, a=3), Row(zz=11, b=22, a=33)] ``` ### Why are the changes needed? This is already supported without Spark Connect. We should match the behaviour for consistent API support. ### Does this PR introduce _any_ user-facing change? Yes, as described above. It fixes a bug, ### How was this patch tested? Manually tested as described above, and unittests were added. ### 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org