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 rewrite - explicit join causes incorrect attribute references and segfaults #25

Closed lordpretzel closed 6 years ago

lordpretzel commented 6 years ago

For attr refs:

  TEMPORAL(SELECT dept_no, a.emp_no, salary      FROM TDB_DEPT_EMP WITH TIME (from_date, to_date) a       JOIN TDB_SALARIES WITH TIME (from_date, to_date) b         ON (a.emp_no = b.emp_no)); 

for three way joins we get a segfault:

  TEMPORAL(SELECT title, salary, dept_no FROM TDB_DEPT_EMP WITH TIME (from_date, to_date)   a      JOIN TDB_SALARIES WITH TIME (from_date, to_date) b         ON (a.emp_no = b.emp_no) JOIN TDB_TITLES  WITH TIME (from_date, to_date) c ON (a.emp_no = c.emp_no) );

even get segfault if no explicit joins

  TEMPORAL(SELECT title, salary, dept_no FROM TDB_DEPT_EMP WITH TIME (from_date, to_date)   a, TDB_SALARIES WITH TIME (from_date, to_date) b,  TDB_TITLES  WITH TIME (from_date, to_date) c WHERE (a.emp_no = c.emp_no) AND (a.emp_no = b.emp_no));
lordpretzel commented 6 years ago

segfault is fixed, but attribute reference problem still not fixed

lordpretzel commented 6 years ago

@nebula0717 determined the cause, it is unrelated to temporal rewrites, but based on a bug in analyzer_oracle.c which caused the join data types to be two copies of the left input's data types