HyukjinKwon commented on code in PR #44531:
URL: https://github.com/apache/spark/pull/44531#discussion_r1439118775
##########
python/pyspark/sql/worker/plan_data_source_read.py:
##########
@@ -258,8 +261,25 @@ def batched(iterator: Iterator, n: int) -> Iterator:
},
)
- for col in range(num_cols):
- pylist[col].append(column_converters[col](result[col]))
+ # Assign output values by name of the field, not position,
if the result is a
+ # named `Row` object.
+ if isinstance(result, Row) and hasattr(result,
"__fields__"):
Review Comment:
Can we match the implementation with python worker? See
`assign_cols_by_name` at `worker.py`.
--
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]