ueshin commented on a change in pull request #35150:
URL: https://github.com/apache/spark/pull/35150#discussion_r781499908
##########
File path: python/pyspark/pandas/frame.py
##########
@@ -7748,12 +7762,11 @@ def resolve(internal: InternalFrame, side: str) ->
InternalFrame:
data_columns = []
column_labels = []
- left_scol_for = lambda label: scol_for(
- left_table, left_internal.spark_column_name_for(label)
- )
- right_scol_for = lambda label: scol_for(
- right_table, right_internal.spark_column_name_for(label)
- )
+ def left_scol_for(label: Union[Label, Column]) -> Column:
Review comment:
ditto.
##########
File path: python/pyspark/pandas/namespace.py
##########
@@ -3430,12 +3432,11 @@ def resolve(internal: InternalFrame, side: str) ->
InternalFrame:
data_columns = []
column_labels = []
- left_scol_for = lambda label: scol_for(
- as_of_joined_table, left_internal.spark_column_name_for(label)
- )
- right_scol_for = lambda label: scol_for(
- as_of_joined_table, right_internal.spark_column_name_for(label)
- )
+ def left_scol_for(label: Union[Label, Column]) -> Column:
+ return scol_for(as_of_joined_table,
left_internal.spark_column_name_for(label))
+
+ def right_scol_for(label: Union[Label, Column]) -> Column:
Review comment:
I guess `Column` won't come to `label`?
##########
File path: python/pyspark/pandas/accessors.py
##########
@@ -335,14 +335,16 @@ def apply_batch(
if not isinstance(func, FunctionType):
assert callable(func), "the first argument should be a callable
function."
f = func
- func = lambda *args, **kwargs: f(*args, **kwargs)
+ func = lambda *args, **kwargs: f(*args, **kwargs) # noqa: E731
Review comment:
Why is this still using lambda?
--
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]