cmu-db/optd

Display cardinality and cost in `explain`

Closed this issue · 1 comments

We should display cardinality and cost of the physical plan in explain.

We can implement this with RelNodeMetaMap introduced in #65, by storing the cost in RelNodeMeta. Since the explain output is produced in a separate traversal of the plan tree after optimization, and Pretty objects are immutable after construction, we should pass the RelNodeMeta as a parameter to dispatch_explain.

cc. @skyzh @yliang412 what do you think?