这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rahulyesantharao
Copy link
Collaborator

The python binding for aggregateByKey (in dataset.py) currently crashes due to the deprecated function get_lambda_source - update to the new function get_udf_source.

@ms705 ms705 requested a review from LeonhardFS July 27, 2021 14:36
Copy link
Member

@ms705 ms705 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; let's merge if @LeonhardFS approves.

@LeonhardFS
Copy link
Contributor

Great, to get this fixed - yet I feel this PR could benefit from adding a (python) test targeting specifically aggregateByKey to the code base, so we will be alerted in the future and won't forget the code accordingly.

Also, is get_lambda_source still a valid function? If it's deprecated, we probably should remove it.

Copy link
Contributor

@LeonhardFS LeonhardFS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add a python test for aggregateByKey & check whether get_lambda-source still exists somewhere in the code base.

@LeonhardFS
Copy link
Contributor

Another thing to maybe improve here is to not use a catch-all try:.... except:... block which basically lead to silent failure, but rather test for a specific CodeExtraction Exception.

@rahulyesantharao
Copy link
Collaborator Author

rahulyesantharao commented Jul 30, 2021

get_lambda_source is defined in interactive_shell.py and is used in get_source in reflection.py - in other words, it is called by the function get_udf_source that replaced it in this file.

@LeonhardFS
Copy link
Contributor

superseded by #19 , closed for now.

@LeonhardFS LeonhardFS closed this Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] AggregateByKey uses old, deprecated function for source code extraction/reflection

3 participants