IITDBGroup / gprom

GProM is a middleware that adds support for provenance to database backends.
http://www.cs.iit.edu/%7edbgroup/research/gprom.php
Apache License 2.0
8 stars 5 forks source link

Temporal Nested Subqueries - serialization #98

Open lordpretzel opened 1 year ago

lordpretzel commented 1 year ago

This one fails to serialize because the possible locations for serializing the nested subquery are not determined correctly.

sequenced temporal (select * from op with time (p_start, p_end) o where exists (select * from ma with time (p_start, p_end) m
where m.mach = o.mach));
CREATE TABLE op (
    staff TEXT,
    mach TEXT,
    p_start INT,
    p_end INT
);

CREATE TABLE ma (
    mach TEXT,
    comp TEXT,
    p_start INT,
    p_end INT
);

INSERT INTO op VALUES
   ('Ann', 'M1', 1, 9),
   ('Joe', 'M1', 9, 15),
   ('Tom', 'M2', 3, 6),
   ('Tom', 'M3', 6, 12),
   ('Ann', 'M1', 15, 17);

INSERT INTO ma VALUES
   ('M1','C1',7,10),
   ('M1','C2',8,11),
   ('M2','C3',3,8);