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

Printer for the plan, ie: EXPLAIN #2075

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

mamcx
Copy link
Contributor

@mamcx mamcx commented Dec 19, 2024

Description of Changes

Incipient support for EXPLAIN with close plan output as in Postgres (but not yet conformant).

It has the extra capability of showing extra metadata about the schema & indexes, useful for testing & debugging.

NOTE: In draft because we want to coordinate with @joshua-spacetime about what will be the desirable testing changes...

Example:

-- Without metadata
Nested Loop
  -> Index Scan using Index id 0: (employee) on m
    -> Index Cond: (m.employee = U64(1))
  -> Seq Scan on p
  Output: id, name
Planning Time: 541.5µs

-- With metadata
Query: SELECT m.* FROM m CROSS JOIN p WHERE m.employee = 1
Nested Loop
  -> Index Scan using Index id 0: (employee) on m:1
    -> Index Cond: (m.employee = U64(1))
  -> Seq Scan on p:2
  Output: id, name
Planning Time: 527.666µs
-------
Schema:

Label m: 1
  Columns: employee, manager
  Indexes: Unique(m.employee)
Label p: 2
  Columns: id, name
  Indexes: Unique(p.id)

Closes #2058.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

  • Adding testing for both optimized or not variations of the plan
  • WILL NEED more test but is likely that we need to do another pr

@mamcx mamcx added no runtime change This change does not affect the final binaries release-1.0 labels Dec 19, 2024
@mamcx mamcx self-assigned this Dec 19, 2024
@mamcx mamcx force-pushed the mamcx/planner-printer branch from be18b08 to 81adebc Compare December 24, 2024 15:58
@mamcx mamcx force-pushed the mamcx/planner-printer branch from 1ca3567 to 75e1cbd Compare January 6, 2025 17:24
@mamcx mamcx changed the base branch from master to joshua/query-engine-integration January 6, 2025 17:26
@mamcx mamcx changed the base branch from joshua/query-engine-integration to master January 6, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no runtime change This change does not affect the final binaries release-1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query plan printer
3 participants