Skip to content

Separate Simple and Full Output styles #42

@wackywendell

Description

@wackywendell

Summary

Substrait-explain should support three output formats:

  • A verbose output format that shows every last detail of the protobuf. Function signatures and and anchors always shown in the Plan section; emit always shown.
  • A full output mode that elides redundant information, but that includes all the information in the protobuf. A valid substrait plan should be convertible to the 'full' substrait-explain output format (text), and then back to a protobuf, and be exactly the same (possibly with the exception of set / unset defaults in Protobuf). In this case, emit would still have to be shown; function signatures and anchors would only need to be shown in the Plan section if not unique in the Extensions section.
  • A simple output format, that shows all the semantics of the plan, but not necessarily every last detail of its encoding. Function signatures and anchors would be shown as in the full mode, but emit would not - emits can be shown by the order of expression, rather than their numerics (so DIRECT may be indistinguishable from the 0..N ordering, which are semantically equivalent); etc.

Motivation

  • verbose is useful as a 'canonical' representation
  • Both full and simple are useful for inspection: simple should be easier to understand the logic of the plan, for debugging planners / execution; full can be useful for understanding the Substrait itself and what was sent over the wire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions