AgenticSpark commented on PR #56726:
URL: https://github.com/apache/spark/pull/56726#issuecomment-4796686734

   Thanks for the review, @uros-b. Addressed all points:
   
   - **Naming** — renamed `_name` → `col_name`. Agreed the leading underscore 
on a documented, `versionadded` API was contradictory; `col_name` keeps the 
collision-avoidance with the existing `Column.name` (the `alias` shortcut) 
without implying private. Also added it to the Column API reference 
(`column.rst`).
   - **`versionadded`** — set to `4.3.0`.
   - **Connect impl** — now `return repr(self._expr)`.
   - **Cast / backend divergence** — good catch. Dropped the "branch on the 
name in a helper" suggestion from the docstring and added a Notes paragraph 
that the string mirrors `repr` and can differ across Classic/Connect for 
compound expressions, so it's for display/names/simple aliases rather than a 
stable key.
   - **Test** — replaced the tautological-only check with concrete assertions 
for the cases that render identically on both backends (`a`, `a AS b`, `CAST(a 
AS INT)`). I deliberately kept the arithmetic case only against the `repr` 
invariant, since `col("x") + 1` renders as `(x + 1)` on Classic but `+(x, 1)` 
on Connect — exactly the divergence you flagged.
   
   Rebased on master. PTAL.


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