Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__repr__ is broken for logical operators #550

Open
senderista opened this issue Jan 9, 2017 · 0 comments
Open

__repr__ is broken for logical operators #550

senderista opened this issue Jan 9, 2017 · 0 comments
Assignees
Labels

Comments

@senderista
Copy link
Contributor

For physical operators, __repr__ persists all constructor args, so we can round-trip between repr() and eval() for physical plans. For logical plans, this doesn't work because the implementation of __repr__ for logical operators only persists the name of the class in the constructor call, with no args.

raco.myrial.myrial_test.MyrialTestCase.get_plan() always round-trips the generated plan through repr() and eval() to exercise this codepath, but that always fails for logical plans as described above. For now, I've disabled the round-tripping for logical plans (it still happens for physical plans).

The proper fix is to override __repr__ on all logical operators just as we do for physical operators.

@senderista senderista added the bug label Jan 9, 2017
@senderista senderista self-assigned this Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant