Polypheny-DB icon indicating copy to clipboard operation
Polypheny-DB copied to clipboard

Textual and Visual Algebra Exploration

Open tobias-weber opened this issue 7 months ago • 0 comments

Summary

This PR enhances Polypheny with the ability to serialize arbitrary query plans into a textual representation called PolyAlgebra. This is the foundation for the new framework-based plan editor system in the UI. The required functionality is provided via new HTTP endpoints and websocket messages.

Changes

  • Removed the old query plan builder
  • Replaced the old InformationQueryPlan with InformationPolyAlg for the new plan editor
  • Changed the order of information pages for executed queries to be grouped by statements

Features

  • Ability to serialize AlgNodes to PolyAlgebra (textual or structured representation)
  • Parser for reconstructing the AlgNodes from PolyAlgebra
  • Directly execute logical / allocation / physical plans specified in PolyAlgebra
  • Supported AlgNodes:
    • all logical AlgNodes
    • for physical: Enumerable and Jdbc (can be used as reference implementation for the remaining AlgNodes)

Tests

  • PolyAlgParsingTest: verifying consistent serialization and reconstruction of query plans for various queries

ToDo

  • [ ] Actions do not yet run successfully. Locally, all tests succeed...
  • [ ] @datomo Fix return type inference for CYPHER_EXTRACT_FROM_PATH, then enable corresponding tests in PolyAlgParsingTest
  • [ ] Register all remaining physical AlgNodes (register declaration, implement bindArguments() and static create() method). This can also be done at a later point, as it is only required for the rare use case of editing physical plans.

tobias-weber avatar Jul 17 '24 11:07 tobias-weber