Yicong-Huang commented on code in PR #55530:
URL: https://github.com/apache/spark/pull/55530#discussion_r3263909317
##########
python/pyspark/worker.py:
##########
@@ -2940,20 +2920,9 @@ def dataframe_iter():
parsed_offsets = extract_key_value_indexes(arg_offsets)
- # Pre-compute expected column names/types for strict result validation.
- # Cogrouped map has a strict contract: missing, extra, or
type-mismatched
- # columns must raise; no silent coercion.
- if runner_conf.assign_cols_by_name:
- expected_cols_and_types = {
- col.name: to_arrow_type(col.dataType, timezone="UTC") for col
in return_type.fields
- }
- reorder_names = [col.name for col in return_type.fields]
- else:
- expected_cols_and_types = [
- (col.name, to_arrow_type(col.dataType, timezone="UTC"))
- for col in return_type.fields
- ]
- reorder_names = None
+ arrow_return_schema = pa.schema(
+ [(col.name, to_arrow_type(col.dataType, timezone="UTC")) for col
in return_type.fields]
+ )
Review Comment:
This was a real bug (missed behavior). I have it fixed in
SPARK-56929(#55961).
--
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]