grundprinzip commented on PR #38806:
URL: https://github.com/apache/spark/pull/38806#issuecomment-1328698464

   From API evolving perspective, I'm fine with wrapping the expressions in the 
Column. In an ideal case, I think it might make most sense if the logical plan 
only deals with Expressions and not Columns because the Column is the public 
facing interface.
   
   Similarly with mapping `str`. This needs to be done before invoking the 
logical plan.
   
   WDYT?
   
   
   Btw, the following expression is not a thing in Python if UnresolvedFunction 
inherits from Column. There are no casts in Python. The casts are purely for 
the type checking
   
   ```
   return cast(Column, UnresolvedFunction("like",  self, 
LiteralExpression(str)))
   ```
   
   ```
   typing.cast(typ, val)
   Cast a value to a type.
   
   This returns the value unchanged. To the type checker this signals that the 
return value has the designated type, but at runtime we intentionally don’t 
check anything (we want this to be as fast as possible).
   ```


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