Skip to content

Commit

Permalink
Add oracle alter table modifylobStorageClause parse rule (#28628)
Browse files Browse the repository at this point in the history
  • Loading branch information
zihaoAK47 authored Oct 4, 2023
1 parent 87c78b3 commit f3dec3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ dropSynonym
;

columnClauses
: operateColumnClause+ | renameColumnClause | modifyCollectionRetrieval
: operateColumnClause+ | renameColumnClause | modifyCollectionRetrieval | modifylobStorageClause
;

operateColumnClause
Expand Down
27 changes: 12 additions & 15 deletions test/it/parser/src/main/resources/case/ddl/alter-table.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@

<alter-table sql-case-id="alter_table_modify_lob_shrink_space">
<table name="employees" start-index="12" stop-index="20" />
<modify-column>
<column-definition start-index="29" stop-index="31">
<column name="LOB" />
</column-definition>
</modify-column>
</alter-table>

<alter-table sql-case-id="alter_table_set_unused">
Expand All @@ -72,11 +67,6 @@

<alter-table sql-case-id="alter_table_modify_lob_cache">
<table name="employees" start-index="12" stop-index="20" />
<modify-column>
<column-definition start-index="29" stop-index="31">
<column name="LOB" />
</column-definition>
</modify-column>
</alter-table>

<alter-table sql-case-id="alter_table_move_storage_tablespace">
Expand Down Expand Up @@ -1600,11 +1590,6 @@

<alter-table sql-case-id="alter_table_modify_lob_nocache">
<table name="employees" start-index="12" stop-index="20" />
<modify-column>
<column-definition start-index="29" stop-index="31">
<column name="LOB" />
</column-definition>
</modify-column>
</alter-table>

<alter-table sql-case-id="alter_table_move_tablespace1">
Expand Down Expand Up @@ -1712,4 +1697,16 @@
</column-definition>
</add-column>
</alter-table>

<alter-table sql-case-id="alter_table_modify_lob1">
<table name="t1" start-index="12" stop-index="13" />
</alter-table>

<alter-table sql-case-id="alter_table_modify_lob2">
<table name="t1" start-index="12" stop-index="13" />
</alter-table>

<alter-table sql-case-id="alter_table_move_compress_for_oltp">
<table name="table_name" start-index="12" stop-index="21" />
</alter-table>
</sql-parser-test-cases>
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,7 @@
<sql-case id="alter_table_add_ref_with_rowid" value="ALTER TABLE staff ADD (REF(dept) WITH ROWID)" db-types="Oracle" />
<sql-case id="alter_table_add_scope_for_is" value="ALTER TABLE staff ADD (SCOPE FOR (dept) IS offices)" db-types="Oracle" />
<sql-case id="alter_table_add_column_no_parentheses" value="ALTER TABLE T_MASK ADD new_column VARCHAR2(100)" db-types="Oracle" />
<sql-case id="alter_table_modify_lob1" value="ALTER TABLE t1 MODIFY LOB(a) (KEEP_DUPLICATES)" db-types="Oracle" />
<sql-case id="alter_table_modify_lob2" value="ALTER TABLE t1 MODIFY LOB(a) (COMPRESS LOW)" db-types="Oracle" />
<sql-case id="alter_table_move_compress_for_oltp" value="ALTER TABLE table_name MOVE COMPRESS FOR OLTP" db-types="Oracle" />
</sql-cases>

0 comments on commit f3dec3c

Please sign in to comment.