citus/src/test/regress
Onder Kalaci 6c9296aca0 Remove uninstantiated qual logic, use attribute equivalences
In this PR, we aim to deduce whether each of the RTE_RELATION
is joined with at least on another RTE_RELATION on their partition keys. If each
RTE_RELATION follows the above rule, we can conclude that all RTE_RELATIONs are
joined on their partition keys.

In order to do that, we invented a new equivalence class namely:
AttributeEquivalenceClass. In very simple words, a AttributeEquivalenceClass is
identified by an unique id and consists of a list of AttributeEquivalenceMembers.

Each AttributeEquivalenceMember is designed to identify attributes uniquely within the
whole query. The necessity of this arise since varno attributes are defined within
a single level of a query. Instead, here we want to identify each RTE_RELATION uniquely
and try to find equality among each RTE_RELATION's partition key.

Whenever we find an equality clause A = B, where both A and B originates from
relation attributes (i.e., not random expressions), we create an
AttributeEquivalenceClass to record this knowledge. If we later find another
equivalence B = C, we create another AttributeEquivalenceClass. Finally, we can
apply transitity rules and generate a new AttributeEquivalenceClass which includes
A, B and C.

Note that equality among the members are identified by the varattno and rteIdentity.

Each equality among RTE_RELATION is saved using an AttributeEquivalenceClass where
each member attribute is identified by a AttributeEquivalenceMember. In the final
step, we try generate a common attribute equivalence class that holds as much as
AttributeEquivalenceMembers whose attributes are a partition keys.
2017-04-13 11:51:26 +03:00
..
data Remove uninstantiated qual logic, use attribute equivalences 2017-04-13 11:51:26 +03:00
expected Remove uninstantiated qual logic, use attribute equivalences 2017-04-13 11:51:26 +03:00
input Remove uninstantiated qual logic, use attribute equivalences 2017-04-13 11:51:26 +03:00
output Remove uninstantiated qual logic, use attribute equivalences 2017-04-13 11:51:26 +03:00
specs Simple isolationtester dml vs. repair tests. 2016-10-27 00:31:41 -07:00
sql Remove uninstantiated qual logic, use attribute equivalences 2017-04-13 11:51:26 +03:00
.gitignore Initial commit of Citus 5.0 2016-02-11 04:05:32 +02:00
Makefile Change checks with built-in type 2017-04-11 14:41:37 +03:00
isolation_schedule Simple isolationtester dml vs. repair tests. 2016-10-27 00:31:41 -07:00
multi_binary_schedule Switch from pg_worker_list.conf file to pg_dist_node metadata table. 2016-10-05 13:01:35 +03:00
multi_mx_schedule Fix Random Fails on Travis 2017-01-31 15:23:06 -08:00
multi_schedule Remove uninstantiated qual logic, use attribute equivalences 2017-04-13 11:51:26 +03:00
multi_task_tracker_extra_schedule Use CustomScan API for query execution 2017-03-14 12:17:51 +02:00
pg_regress_multi.pl Change default replication factor to one 2017-01-20 18:56:43 -07:00
worker_schedule Initial commit of Citus 5.0 2016-02-11 04:05:32 +02:00