removed join algo
This commit is contained in:
		
							parent
							
								
									ec924ab500
								
							
						
					
					
						commit
						7ab73f7b2b
					
				@ -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;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -135,7 +135,7 @@ typedef void* yyscan_t;
 | 
			
		||||
%type <order>		opt_order
 | 
			
		||||
%type <limit>		opt_limit
 | 
			
		||||
%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
 | 
			
		||||
@ -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:
 | 
			
		||||
 | 
			
		||||
@ -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'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user