Skip to content

Commit 47d48a2

Browse files
author
Alexander Zhdanov
committed
Fix create/alter TS clauses after merge
1 parent 794912a commit 47d48a2

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

src/dsql/parse.y

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,22 +1557,21 @@ create_clause
15571557
node->createIfNotExistsOnly = $2;
15581558
$$ = node;
15591559
}
1560-
| unique_opt order_direction INDEX if_not_exists_opt symbol_index_name index_active_opt ON simple_table_name
1560+
| unique_opt order_direction INDEX if_not_exists_opt symbol_index_name ON simple_table_name
15611561
{
15621562
const auto node = newNode<CreateIndexNode>(*$5);
1563-
node->active = $6;
15641563
node->unique = $1;
15651564
node->descending = $2;
15661565
node->createIfNotExistsOnly = $4;
1567-
node->relation = $8;
1566+
node->relation = $7;
15681567
$$ = node;
15691568
}
1570-
index_definition(static_cast<CreateIndexNode*>($9)) tablespace_name_clause_opt
1569+
index_definition(static_cast<CreateIndexNode*>($8)) tablespace_name_clause_opt
15711570
{
15721571
if ($10)
1573-
static_cast<CreateIndexNode*>($9)->tableSpace = *$11;
1572+
static_cast<CreateIndexNode*>($8)->tableSpace = *$10;
15741573

1575-
$$ = $9;
1574+
$$ = $8;
15761575
}
15771576
| FUNCTION if_not_exists_opt function_clause
15781577
{
@@ -1777,12 +1776,6 @@ alter_exception_clause
17771776

17781777
// CREATE INDEX
17791778

1780-
%type <boolVal> index_active_opt
1781-
index_active_opt
1782-
: /* nothing */ { $$ = true; }
1783-
| index_active { $$ = $1; }
1784-
;
1785-
17861779
%type <boolVal> unique_opt
17871780
unique_opt
17881781
: /* nothing */ { $$ = false; }
@@ -4737,7 +4730,8 @@ drop_behaviour
47374730

47384731
%type <ddlNode> alter_index_clause
47394732
alter_index_clause
4740-
: symbol_index_name index_active { $$ = newNode<AlterIndexNode>(*$1, $2); }
4733+
: symbol_index_name ACTIVE { $$ = newNode<AlterIndexNode>(*$1, AlterIndexNode::OP_ACTIVE); }
4734+
| symbol_index_name INACTIVE { $$ = newNode<AlterIndexNode>(*$1, AlterIndexNode::OP_INACTIVE); }
47414735
| symbol_index_name SET TABLESPACE to_opt symbol_tablespace_name
47424736
{
47434737
AlterIndexNode* node = newNode<AlterIndexNode>(*$1, AlterIndexNode::OP_SET_TABLESPACE);
@@ -4746,12 +4740,6 @@ alter_index_clause
47464740
}
47474741
;
47484742

4749-
%type <boolVal> index_active
4750-
index_active
4751-
: ACTIVE { $$ = AlterIndexNode::OP_ACTIVE; }
4752-
| INACTIVE { $$ = AlterIndexNode::OP_INACTIVE; }
4753-
;
4754-
47554743
%type <ddlNode> alter_udf_clause
47564744
alter_udf_clause
47574745
: symbol_UDF_name entry_op module_op

0 commit comments

Comments
 (0)