Thanks to visit codestin.com
Credit goes to github.com

Skip to content

__repr__ is broken for logical operators #550

@senderista

Description

@senderista

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions