From 7ab73f7b2be4c4d932d4442cbdf841baf9de737e Mon Sep 17 00:00:00 2001 From: Pedro Date: Tue, 18 Nov 2014 16:38:31 +0100 Subject: [PATCH] removed join algo --- src/lib/Table.h | 14 +------------- src/parser/bison_parser.y | 15 ++++----------- test/valid_queries.sql | 2 +- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/lib/Table.h b/src/lib/Table.h index f5ba457..ba76cb3 100644 --- a/src/lib/Table.h +++ b/src/lib/Table.h @@ -69,16 +69,6 @@ typedef enum { kJoinRight, } JoinType; -/** - * Specifying a join algorithm is not standard. - * This is specific to Hyrise. - */ -typedef enum { - kJoinAlgoScan, - kJoinAlgoHash, - kJoinAlgoRadix -} JoinAlgorithm; - /** * Definition of a join table */ @@ -87,8 +77,7 @@ struct JoinDefinition { left(NULL), right(NULL), condition(NULL), - type(kJoinInner), - algorithm(kJoinAlgoScan) {} + type(kJoinInner) {} virtual ~JoinDefinition(); // defined in destructors.cpp @@ -97,7 +86,6 @@ struct JoinDefinition { Expr* condition; JoinType type; - JoinAlgorithm algorithm; }; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 1dd0040..c0cb486 100644 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -135,7 +135,7 @@ typedef void* yyscan_t; %type opt_order %type opt_limit %type opt_order_type -%type import_file_type opt_join_type opt_join_algorithm +%type import_file_type opt_join_type /****************************** ** Token Precedence and Associativity @@ -466,15 +466,14 @@ opt_alias: ******************************/ 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); $$->join = new JoinDefinition(); $$->join->type = (JoinType) $2; - $$->join->algorithm = (JoinAlgorithm) $3; $$->join->left = $1; - $$->join->right = $5; - $$->join->condition = $7; + $$->join->right = $4; + $$->join->condition = $6; } ; @@ -486,12 +485,6 @@ opt_join_type: | /* empty, default */ { $$ = kJoinInner; } ; -opt_join_algorithm: - SCAN { $$ = kJoinAlgoScan; } - | HASH { $$ = kJoinAlgoHash; } - | RADIX { $$ = kJoinAlgoRadix; } - | /* empty, default */ { $$ = kJoinAlgoScan; } - join_table: diff --git a/test/valid_queries.sql b/test/valid_queries.sql index a2cb3b3..65c8d9b 100644 --- a/test/valid_queries.sql +++ b/test/valid_queries.sql @@ -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; # 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 * FROM t1 HASH JOIN t2 ON c1 = c2; +SELECT * FROM t1 JOIN t2 ON c1 = c2; # CREATE statement CREATE TABLE "table" FROM TBL FILE 'students.tbl' CREATE TABLE IF NOT EXISTS "table" FROM TBL FILE 'students.tbl'