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

Textual and Visual Algebra Exploration #503

Open
wants to merge 109 commits into
base: master
Choose a base branch
from

Conversation

tobias-weber
Copy link
Contributor

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 and others added 30 commits July 12, 2024 10:59
…ary substitution for documents to improve performance

PolyAlgParseException convertException(Throwable ex) throws ParseException {
if (ex instanceof PolyAlgParseException) {
return (PolyAlgParseException) ex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern variable

int[][] expectedTokenSequences = null;
String[] tokenImage = null;
if (ex instanceof ParseException) {
ParseException pex = (ParseException) ex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern variable

token.endColumn);
}
} else if (ex instanceof TokenMgrError) {
TokenMgrError tme = (TokenMgrError) ex;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants