Skip to content

Commit

Permalink
[PlSql] Support of Create Index with Cursor Invalidation (antlr#3913)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasahsan123 authored Dec 27, 2023
1 parent defadc9 commit faa6377
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions sql/plsql/PlSqlLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ INTERVAL : 'INTERVAL';
INT : 'INT';
INTO : 'INTO';
INVALIDATE : 'INVALIDATE';
INVALIDATION : 'INVALIDATION';
INVISIBLE : 'INVISIBLE';
IN_XQUERY : 'IN_XQUERY';
IS : 'IS';
Expand Down
3 changes: 2 additions & 1 deletion sql/plsql/PlSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ create_index
cluster_index_clause
| table_index_clause
| bitmap_join_index_clause
) (USABLE | UNUSABLE)?
) (USABLE | UNUSABLE)? ((DEFERRED | IMMEDIATE) INVALIDATION)?
;

cluster_index_clause
Expand Down Expand Up @@ -7515,6 +7515,7 @@ non_reserved_keywords_in_12c
| INMEMORY_PRUNING
| INPLACE
| INTERLEAVED
| INVALIDATION
| ISOLATE
| IS_LEAF
| JSON
Expand Down
3 changes: 3 additions & 0 deletions sql/plsql/examples/create_index.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ CREATE INDEX INDEX_SYS_LOG_YEAR ON SYS_LOG (YEAR)
PARTITION p2 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN (2030),
PARTITION p3 VALUES LESS THAN (MAXVALUE));

CREATE UNIQUE INDEX order_index ON t_order (order_id) IMMEDIATE INVALIDATION;
CREATE UNIQUE INDEX order_index ON t_order (order_id) DEFERRED INVALIDATION;

0 comments on commit faa6377

Please sign in to comment.