HyukjinKwon commented on code in PR #59312:
URL: https://github.com/apache/spark/pull/59312#discussion_r4237335019


##########
python/pyspark/eval_handlers/tests/test_pandas_eval_type_handlers.py:
##########
@@ -95,6 +98,37 @@ def _map_handler(udf, return_type, runner_conf=None):
     )
 
 
+def _grouped_arg_offsets(*dataframes):
+    """Encode ``arg_offsets`` from ``(key_cols, value_cols)`` per DataFrame, 
laid out
+    as ``[length, num_keys, *key_cols, *value_cols]`` 
(BasePandasGroupExec.resolveArgOffsets).

Review Comment:
   **Nit (P3):** This docstring cites `BasePandasGroupExec.resolveArgOffsets`, 
but no class by that name exists in the tree. The `[length, num_keys, 
*key_cols, *value_cols]` layout is produced by 
`PandasGroupUtils.resolveArgOffsets` 
(sql/core/src/main/scala/org/apache/spark/sql/execution/python/PandasGroupUtils.scala),
 so a reader following this reference hits a dead end. The encoded layout 
itself is correct.
   
   ```suggestion
       as ``[length, num_keys, *key_cols, *value_cols]`` 
(PandasGroupUtils.resolveArgOffsets).
   ```
   
   The same stale name already appears in `eval_handlers/utils.py` and 
`test_arrow_eval_type_handlers.py`. Fixing those is optional and outside this 
PR.
   
   **Verification:**
   - **Inspection:** The symbol cited by the new helper docstring resolves to 
an existing definition (PandasGroupUtils.resolveArgOffsets), and no line added 
by this PR references BasePandasGroupExec.



-- 
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