Liangda-w commented on a change in pull request #10752:
URL: https://github.com/apache/shardingsphere/pull/10752#discussion_r649175409



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/ddl/create-table.xml
##########
@@ -113,122 +102,15 @@
     <sql-case id="create_table_with_inline_check_sqlserver" value="CREATE 
TABLE t_order (order_id INT CONSTRAINT chk_order_id CHECK (order_id > 0), 
user_id INT, status VARCHAR(10), column1 VARCHAR(10), column2 VARCHAR(10), 
column3 VARCHAR(10))" db-types="SQLServer" />
     <sql-case id="create_table_with_inline_constraints_sqlserver" 
value="CREATE TABLE t_order (order_id INT PRIMARY KEY UNIQUE CHECK (order_id > 
0), user_id INT, status VARCHAR(10), column1 VARCHAR(10), column2 VARCHAR(10), 
column3 VARCHAR(10))" db-types="SQLServer" />
     <sql-case id="create_table_with_index" value="CREATE TABLE t_order 
(order_id INT INDEX order_index, user_id INT, status VARCHAR(10), column1 
VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10))" db-types="SQLServer" />
-    <sql-case id="create_gin_index" value="CREATE INDEX gin_idx ON t_order 
USING GIN (locations) WITH (fastupdate = off)" db-types="PostgreSQL" />
     <sql-case id="create_table_with_range_partitioned_and_values" 
value="CREATE TABLE t_order PARTITION OF cities (CONSTRAINT city_id_nonzero 
CHECK (city_id != 0)) FOR VALUES IN ('a', 'b') PARTITION BY RANGE (population)" 
db-types="PostgreSQL" />
     <sql-case id="create_table_partition_by_hash" value="CREATE TABLE t_order 
(order_id bigint not null,cust_id bigint not null,status text) PARTITION BY 
HASH (order_id)" db-types="PostgreSQL" />
     <sql-case id="create_table_partition_by_list" value="CREATE TABLE t_order 
(city_id bigserial not null,name text not null,population bigint) PARTITION BY 
LIST (left(lower(name), 1))" db-types="PostgreSQL" />
     <sql-case id="create_table_of_type"  value="CREATE TABLE t_order OF 
employee_type (PRIMARY KEY (name),salary WITH OPTIONS DEFAULT 1000)" 
db-types="PostgreSQL" />
     <sql-case id="create_table_in_tablespace" value="CREATE TABLE t_order (id 
serial,name text,location text) TABLESPACE diskvol1" db-types="PostgreSQL" />
     <sql-case id="create_table_with_sign_column" value="CREATE TABLE 
t_order(id INT PRIMARY KEY, order_id BIGINT(20) SIGNED)" db-types="MySQL" />
     <sql-case id="create_table_with_unsigned_column" value="CREATE TABLE 
t_order(id INT PRIMARY KEY, order_id BIGINT(20) UNSIGNED)" db-types="MySQL" />
-    
-<!--    create index test-->
-    <sql-case id="create_index" value="CREATE INDEX t_log_index ON t_log (id)" 
db-types="H2,MySQL,PostgreSQL,Oracle,SQLServer" />
-    <sql-case id="create_index_with_space" value="    CREATE INDEX
-        order_index
-    ON
-        t_order (order_id)    " db-types="MySQL,SQLServer" />
-    <sql-case id="create_index_with_back_quota" value="CREATE INDEX 
`order_index` ON `t_order` (`order_id`)" db-types="MySQL" />
-    <sql-case id="create_index_with_quota" value="CREATE INDEX 
&quot;order_index&quot; ON &quot;t_order&quot; (&quot;order_id&quot;)" 
db-types="Oracle" />
-    <sql-case id="create_index_with_function" value="CREATE INDEX 
idx_upper_status ON t_order (UPPER(status))" db-types="Oracle,PostgreSQL" />
-    <sql-case id="create_index_with_bracket" value="CREATE INDEX [order_index] 
ON [t_order] ([order_id])" db-types="SQLServer" />
-    <sql-case id="create_index_with_no_default_fill_factor" value="CREATE 
UNIQUE INDEX order_index ON t_order (order_id) WITH (fillfactor = 70)" 
db-types="PostgreSQL"/>
-    <sql-case id="create_index_with_tablespace" value="CREATE INDEX code_idx 
ON t_order (code) TABLESPACE indexspace" db-types="PostgreSQL"/>
-    <sql-case id="create_index_using_gist" value="CREATE INDEX pointloc ON 
t_order USING gist (func1(location,location))" db-types="PostgreSQL" />
-    <sql-case id="create_index_with_concurrently" value="CREATE INDEX 
CONCURRENTLY sales_quantity_index ON t_order(quantity)" db-types="PostgreSQL" />
-    <sql-case id="create_index_with_double_quota" value="CREATE INDEX 
&quot;order_index&quot; ON &quot;t_order&quot; (&quot;order_id&quot;)" 
db-types="PostgreSQL" />
-    <sql-case id="create_index_with_double_quota_and_uescape" value="CREATE 
INDEX U&amp;&quot;order_index!0061t!+000061&quot; UESCAPE '!' ON 
u&amp;&quot;t_order&quot; (u&amp;&quot;order_id&quot;)" db-types="PostgreSQL" />
-    <sql-case id="create_index_concurrently" value="CREATE INDEX CONCURRENTLY 
order_index ON t_order (order_id)" db-types="PostgreSQL" />
-    <sql-case id="create_index_if_not_exists" value="CREATE INDEX IF NOT 
EXISTS order_index ON t_order (order_id)" db-types="PostgreSQL" />
-    <sql-case id="create_index_using_btree" value="CREATE INDEX order_index ON 
t_order (order_id) USING BTREE" db-types="PostgreSQL" />
-    <sql-case id="create_index_with_unique" value="CREATE UNIQUE INDEX 
order_index ON t_order (order_id)" db-types="Oracle" />
-    <sql-case id="create_index_with_usable" value="CREATE UNIQUE INDEX 
order_index ON t_order (order_id) USABLE" db-types="Oracle" />
-    <sql-case id="create_index_with_unusable" value="CREATE UNIQUE INDEX 
order_index ON t_order (order_id) UNUSABLE" db-types="Oracle" />
-    <sql-case id="create_index_with_immediate_invalidation" value="CREATE 
UNIQUE INDEX order_index ON t_order (order_id) IMMEDIATE INVALIDATION" 
db-types="Oracle" />
-    <sql-case id="create_index_with_cluster_index" value="CREATE UNIQUE INDEX 
order_index ON CLUSTER t_cluster" db-types="Oracle" />
-    <sql-case id="create_index_with_bitmap" value="CREATE BITMAP INDEX 
order_index ON t_order (order_id)" db-types="Oracle" />
-    
-<!--    create database test-->
-    <sql-case id="create_database" value="CREATE DATABASE lusiadas" 
db-types="PostgreSQL" />
-    <sql-case id="create_database_owner" value="CREATE DATABASE sales OWNER 
salesapp TABLESPACE salesspace" db-types="PostgreSQL" />
-    <sql-case id="create_database_with_location_and_encoding" value="CREATE 
DATABASE music2
-        LC_COLLATE 'sv_SE.iso885915' LC_CTYPE 'sv_SE.iso885915'
-        ENCODING LATIN9
-        TEMPLATE template0" db-types="PostgreSQL" />
-    <sql-case id="create_database_with_location" value="CREATE DATABASE music
-        LC_COLLATE 'sv_SE.utf8' LC_CTYPE 'sv_SE.utf8'
-        TEMPLATE template0" db-types="PostgreSQL" />
-
-<!--    create function test-->
-    <sql-case id="create_function" value="CREATE FUNCTION add(integer, 
integer) RETURNS integer
-        AS 'select $1 + $2;'
-        LANGUAGE SQL
-        IMMUTABLE
-        RETURNS NULL ON NULL INPUT" db-types="PostgreSQL" />

Review comment:
       yes, e.g. I just divided `alter` into `alter-table`, `alter-database`... 
like what we have in 
`shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/case/ddl`
 for a better structure:)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to