Skip to content

Conversation

@zhengruifeng
Copy link
Contributor

What changes were proposed in this pull request?

1, #39068 reused the UnresolvedAttribute for the UnresolvedNamedLambdaVariable, but then Column('x') and UnresolvedNamedLambdaVariable('x') are mixed in lambda x: x + cdf.x (since we use x/y/z as augment names); this PR adds the UnresolvedNamedLambdaVariable back to distinguish between Column('x') and UnresolvedNamedLambdaVariable('x');

2, the refreshVarName logic in PySpark was added in #32523 to address similar issue in PySpark's Lambda Function, this PR adds a similar function in the Python Client to avoid rewriting the function expression in the server side, which is unnecessary and prone to error .

Why are the changes needed?

before this PR, the nested lambda function doesn't work properly

Does this PR introduce any user-facing change?

no

How was this patch tested?

enabled UT and added UT

init

init
@zhengruifeng zhengruifeng force-pushed the connect_fix_nested_lambda branch from ac2814d to 767498b Compare January 17, 2023 03:59
@zhengruifeng
Copy link
Contributor Author

@zhengruifeng
Copy link
Contributor Author

thanks for the reviews, merged into master

@zhengruifeng zhengruifeng deleted the connect_fix_nested_lambda branch January 17, 2023 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants