ftsrg / ingraph

Incremental view maintenance for openCypher graph queries.
http://docs.inf.mit.bme.hu/ingraph/
Eclipse Public License 1.0
48 stars 10 forks source link

Implement tuple semantics for query plans #39

Closed szarnyasg closed 7 years ago

szarnyasg commented 7 years ago

Query plans should implement tuple semantics, i.e. instead of using attribute names, they should use tuples and indices. This is required by ire.

szarnyasg commented 7 years ago

This could be done using a multi-pass algorithm.

Input: relational algebra container with schema inferencer already executed. The relational algebra tree has its root node (output) at the top and its leaves (inputs) at the bottom.

Let's if unary/binary operators have effect (towards the root of the tree) or requirements (towards leaf nodes).

Operator Has effect :arrow_up: Has requirements :arrow_down:
Unary nodes
projection x x
selection - x
duplicate elimination - -
grouping x x
sorting - x
top - -
expand* - -
unwind - x
all-different - -
Binary nodes
union - -
natural join x -
left outer join x -
antijoin x -
  1. Based on the basic schema of the nodes, create a "detailed schema". Copy the basic schema and determine which properties need to be access for each node. Propagate these down the tree (towards the leaves).
  2. Starting from the leaves, build the tuples. We assign a bidirectional <String, Integer> map for each Rete node that contains the mapping from the schema to tuples.
szarnyasg commented 7 years ago