citus/src/backend/distributed/planner
Nils Dijk 217890af5f
Feature: Expression in reference join (#3180)
DESCRIPTION: Expression in reference join

Fixed: #2582

This patch allows arbitrary expressions in the join clause when joining to a reference table. An example of such joins could be found in CHbenCHmark queries 7, 8, 9 and 11; `mod((s_w_id * s_i_id),10000) = su_suppkey` and `ascii(substr(c_state,1,1)) = n2.n_nationkey`. Since the join is on a reference table these queries are able to be pushed down to the workers.

To implement these queries we will widen the `IsJoinClause` predicate to not check if the expressions are a type `Var` after stripping the implicit coerciens. Instead we define a join clause when the `Var`'s in a clause come from more than 1 table.

This allows more clauses to pass into the logical planner's `MultiNodeTree(...)` planning function. To compensate for this we tighten down the `LocalJoin`, `SinglePartitionJoin` and `DualPartitionJoin` to check for direct column references when planning. This allows the planner to work with arbitrary join expressions on reference tables.
2019-11-18 16:25:46 +01:00
..
deparse_shard_query.c pg12: version_compat.h, tuples, oids, misc 2019-08-22 18:57:23 +00:00
distributed_planner.c Plan reference/local table joins locally 2019-11-15 07:36:50 -08:00
extended_op_node_utils.c Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
fast_path_router_planner.c Fix up includes with pg12 changes 2019-08-22 18:56:21 +00:00
function_call_delegation.c DEBUG only when the function is distributed 2019-11-05 15:08:35 +00:00
insert_select_planner.c add IsLoggableLevel utility function (#3149) 2019-11-15 14:59:13 +03:00
multi_explain.c Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
multi_join_order.c Feature: Expression in reference join (#3180) 2019-11-18 16:25:46 +01:00
multi_logical_optimizer.c Phase 1 implementation of custom aggregates 2019-11-14 19:01:24 +00:00
multi_logical_planner.c Feature: Expression in reference join (#3180) 2019-11-18 16:25:46 +01:00
multi_master_planner.c Don't warn for declaration-after-statement since we only support GNU99 (#3132) 2019-11-15 09:46:06 +01:00
multi_physical_planner.c Feature: Expression in reference join (#3180) 2019-11-18 16:25:46 +01:00
multi_router_planner.c Do not include coordinator shards when round-robin is selected 2019-11-15 06:03:32 -08:00
planner_readme.md Introduce fast path router planning 2019-02-21 13:27:01 +03:00
postgres_planning_functions.c Collations matter for hashing strings in pg12 2019-08-22 18:58:37 +00:00
query_colocation_checker.c Remove copyright years (#2918) 2019-10-15 17:44:30 +03:00
query_pushdown_planning.c Make simple in queries on unique columns work with repartion join (#3171) 2019-11-11 13:44:28 +01:00
recursive_planning.c add IsLoggableLevel utility function (#3149) 2019-11-15 14:59:13 +03:00
relation_restriction_equivalence.c Include all relevant relations in the ExtractRangeTableRelationWalker (#3135) 2019-11-01 16:06:58 +01:00
shard_pruning.c Include fmgr.h, don't duplicate FunctionCallInfo typedef 2019-11-04 17:10:33 +00:00