removed join algo

This commit is contained in:
Pedro 2014-11-18 16:38:31 +01:00
parent ec924ab500
commit 7ab73f7b2b
3 changed files with 6 additions and 25 deletions

View File

@ -69,16 +69,6 @@ typedef enum {
kJoinRight, kJoinRight,
} JoinType; } JoinType;
/**
* Specifying a join algorithm is not standard.
* This is specific to Hyrise.
*/
typedef enum {
kJoinAlgoScan,
kJoinAlgoHash,
kJoinAlgoRadix
} JoinAlgorithm;
/** /**
* Definition of a join table * Definition of a join table
*/ */
@ -87,8 +77,7 @@ struct JoinDefinition {
left(NULL), left(NULL),
right(NULL), right(NULL),
condition(NULL), condition(NULL),
type(kJoinInner), type(kJoinInner) {}
algorithm(kJoinAlgoScan) {}
virtual ~JoinDefinition(); // defined in destructors.cpp virtual ~JoinDefinition(); // defined in destructors.cpp
@ -97,7 +86,6 @@ struct JoinDefinition {
Expr* condition; Expr* condition;
JoinType type; JoinType type;
JoinAlgorithm algorithm;
}; };

View File

@ -135,7 +135,7 @@ typedef void* yyscan_t;
%type <order> opt_order %type <order> opt_order
%type <limit> opt_limit %type <limit> opt_limit
%type <order_type> opt_order_type %type <order_type> opt_order_type
%type <uval> import_file_type opt_join_type opt_join_algorithm %type <uval> import_file_type opt_join_type
/****************************** /******************************
** Token Precedence and Associativity ** Token Precedence and Associativity
@ -466,15 +466,14 @@ opt_alias:
******************************/ ******************************/
join_clause: join_clause:
join_table opt_join_algorithm opt_join_type JOIN join_table ON join_condition join_table opt_join_type JOIN join_table ON join_condition
{ {
$$ = new TableRef(kTableJoin); $$ = new TableRef(kTableJoin);
$$->join = new JoinDefinition(); $$->join = new JoinDefinition();
$$->join->type = (JoinType) $2; $$->join->type = (JoinType) $2;
$$->join->algorithm = (JoinAlgorithm) $3;
$$->join->left = $1; $$->join->left = $1;
$$->join->right = $5; $$->join->right = $4;
$$->join->condition = $7; $$->join->condition = $6;
} }
; ;
@ -486,12 +485,6 @@ opt_join_type:
| /* empty, default */ { $$ = kJoinInner; } | /* empty, default */ { $$ = kJoinInner; }
; ;
opt_join_algorithm:
SCAN { $$ = kJoinAlgoScan; }
| HASH { $$ = kJoinAlgoHash; }
| RADIX { $$ = kJoinAlgoRadix; }
| /* empty, default */ { $$ = kJoinAlgoScan; }
join_table: join_table:

View File

@ -10,7 +10,7 @@ SELECT * FROM t1 UNION (SELECT * FROM t2) ORDER BY col1;
SELECT * FROM t1 UNION (SELECT * FROM t2 UNION SELECT * FROM t3) ORDER BY col1; SELECT * FROM t1 UNION (SELECT * FROM t2 UNION SELECT * FROM t3) ORDER BY col1;
# JOIN # JOIN
SELECT t1.a, t1.b, t2.c FROM "table" AS t1 JOIN (SELECT * FROM foo JOIN bar ON foo.id = bar.id) t2 ON t1.a = t2.b WHERE (t1.b OR NOT t1.a) AND t2.c = 12.5 SELECT t1.a, t1.b, t2.c FROM "table" AS t1 JOIN (SELECT * FROM foo JOIN bar ON foo.id = bar.id) t2 ON t1.a = t2.b WHERE (t1.b OR NOT t1.a) AND t2.c = 12.5
SELECT * FROM t1 HASH JOIN t2 ON c1 = c2; SELECT * FROM t1 JOIN t2 ON c1 = c2;
# CREATE statement # CREATE statement
CREATE TABLE "table" FROM TBL FILE 'students.tbl' CREATE TABLE "table" FROM TBL FILE 'students.tbl'
CREATE TABLE IF NOT EXISTS "table" FROM TBL FILE 'students.tbl' CREATE TABLE IF NOT EXISTS "table" FROM TBL FILE 'students.tbl'