strongduanmu opened a new issue, #10368:
URL: https://github.com/apache/shardingsphere/issues/10368

   # Background
   
   The sharding function of SS 4.X version is 100% compatible with routing to 
single data node SQL(including single table SQL (implemented by 
defaultDataSourceName) or sharding table). Due to the refactoring of the kernel 
in SS 5.X, some SQL execute abnormally, which needs to be investigated  and 
supported.
   
   # Task
   
   - [ ] MySQL routing to single data node SQL support
     - [ ] DALStatement(pending)
     - [ ] DCLStatement
     - [x] DDLStatement(core SQL statement has been supported)
     - [x] DMLStatement(core SQL statement has been supported)
     - [ ] RLStatement
     - [ ] TCLStatement
   - [ ] PostgreSQL routing to single data node SQL support
     - [ ] DALStatement(pending)
     - [ ] DCLStatement
     - [ ] DDLStatement (doing)
     - [ ] DMLStatement (doing)
     - [ ] StoreProcedure
     - [ ] TCLStatement
   - [ ] Oracle routing to single data node SQL support (low priority)
   - [ ] SQLServer routing to single data node SQL support (low priority)
   - [ ] SQL92 routing to single data node SQL support (low priority)
   
   # Investigate results
   
   The investigate results are tested using the following sharding rules.
   
   ```yaml
   rules:
   - !SHARDING
    tables:
      t_order:
        actualDataNodes: ds_${0..1}.t_order_${0..1}
        tableStrategy:
          standard:
            shardingColumn: order_id
            shardingAlgorithmName: t_order_inline
        keyGenerateStrategy:
          column: order_id
          keyGeneratorName: snowflake
      t_order_item:
        actualDataNodes: ds_${0..1}.t_order_item_${0..1}
        tableStrategy:
          standard:
            shardingColumn: order_id
            shardingAlgorithmName: t_order_item_inline
        keyGenerateStrategy:
          column: order_item_id
          keyGeneratorName: snowflake
      t_user:
        actualDataNodes: ds_0.t_user_0
    bindingTables:
      - t_order,t_order_item
    broadcastTables:
      - t_config
    defaultDatabaseStrategy:
      standard:
        shardingColumn: user_id
        shardingAlgorithmName: database_inline
    defaultTableStrategy:
      none:
   
    shardingAlgorithms:
      database_inline:
        type: INLINE
        props:
          algorithm-expression: ds_${user_id % 2}
      t_order_inline:
        type: INLINE
        props:
          algorithm-expression: t_order_${order_id % 2}
      t_order_item_inline:
        type: INLINE
        props:
          algorithm-expression: t_order_item_${order_id % 2}
   
    keyGenerators:
      snowflake:
        type: SNOWFLAKE
        props:
          worker-id: 123
   ```
   
   ### MySQL DALStatement
   
   > show statement include:
   >
   > showDatabases, showTables, showTableStatus, showBinaryLogs, showColumns, 
showIndex, showCreateDatabase, showCreateTable, showBinlogEvents, 
showCharacterSet, showCollation, showCreateEvent, showCreateFunction, 
showCreateProcedure, showCreateTrigger, showCreateUser, showCreateView, 
showEngine, showEngines, showCharset, showErrors, showEvents, showFunctionCode, 
showFunctionStatus, showGrant, showMasterStatus, showPlugins, showOpenTables, 
showPrivileges, showProcedureCode, showProcesslist, showProfile, 
showProcedureStatus, showProfiles, showSlavehost, showSlaveStatus, 
showRelaylogEvent, showStatus, showTrriggers, showWarnings, showVariables
   
   | statement              | logic SQL                                         
           | actual SQL                                                   | 
route engine                                  | supported   |
   | ---------------------- | 
------------------------------------------------------------ | 
------------------------------------------------------------ | 
--------------------------------------------- | ----------- |
   | use                    | USE *sharding_db;*                                
           | -                                                            | 
ShardingIgnoreRoutingEngine                   | support     |
   | help                   | HELP 'create table';                              
           |                                                              |     
                                          | not support |
   | explain                | EXPLAIN t_order; EXPLAIN SELECT * FROM t_order;   
           | ds_0 EXPLAIN t_order_0; ds_0 EXPLAIN SELECT * FROM t_order_0; | 
ShardingUnicastRoutingEngine                  | support     |
   |                        | EXPLAIN t_user; EXPLAIN SELECT * FROM t_user;     
           | ds_0 EXPLAIN t_user_0; ds_0 EXPLAIN select * from t_user_0;  | 
ShardingUnicastRoutingEngine                  | support     |
   |                        | EXPLAIN t_config; EXPLAIN SELECT * FROM t_config; 
           | ds_0 EXPLAIN t_config; ds_0 EXPLAIN SELECT * FROM t_config;  | 
ShardingUnicastRoutingEngine                  | support     |
   |                        | EXPLAIN t_single; EXPLAIN SELECT * FROM t_single; 
           | ds_1 EXPLAIN t_single; ds_1 EXPLAIN SELECT * FROM t_single;  | 
SingleTablesRoutingEngine                     | support     |
   | show                   | SHOW DATABASES;                                   
           | -                                                            | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   |                        | SHOW TABLES;                                      
           | -                                                            | -   
                                          | support     |
   |                        | SHOW TABLE STATUS FROM *sharding_db;*             
           | ds0 SHOW TABLE STATUS;                                       | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW BINARY LOGS;                                 
           | ds0 SHOW BINARY LOGS;                                        | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW COLUMNS FROM t_order FROM *sharding_db* LIKE 
'%tent%'; SHOW COLUMNS FROM t_user FROM *sharding_db* LIKE '%tent%'; SHOW 
COLUMNS FROM t_config FROM *sharding_db* LIKE '%tent%'; | ds_0 SHOW COLUMNS 
FROM t_order_0  LIKE '%tent%'; ds_0 SHOW COLUMNS FROM t_user_0  LIKE '%tent%'; 
ds_0 SHOW COLUMNS FROM t_config  LIKE '%tent%'; | ShardingUnicastRoutingEngine  
                | support     |
   |                        | SHOW COLUMNS FROM t_single FROM *sharding_db* 
LIKE '%tent%'; | ds_1 SHOW COLUMNS FROM t_single  LIKE '%tent%';              | 
SingleTablesRoutingEngine                     | support     |
   |                        | SHOW INDEX FROM t_order FROM *sharding_db*; SHOW 
INDEX FROM t_user FROM *sharding_db*; SHOW INDEX FROM t_config FROM 
sharding_db; | ds0 SHOW INDEX FROM t_order_0 FROM sharding_db; ds_0 SHOW INDEX 
FROM t_user_0 FROM sharding_db; ds_0 SHOW INDEX FROM t_config FROM sharding_db; 
| ShardingUnicastRoutingEngine                  | not support |
   |                        | SHOW INDEX FROM t_single FROM *sharding_db*       
           | ds_1 SHOW INDEX FROM t_single FROM *sharding_db;*            | 
SingleTablesRoutingEngine                     | not support |
   |                        | SHOW CREATE DATABASE *sharding_db*;               
           |                                                              |     
                                          | not support |
   |                        | SHOW CREATE TABLE t_order; SHOW CREATE TABLE 
t_user; SHOW CREATE TABLE t_config; | ds_0 SHOW CREATE TABLE t_order_0; ds_0 
SHOW CREATE TABLE t_user_0; ds_1 SHOW CREATE TABLE t_config; | 
ShardingUnicastRoutingEngine                  | support     |
   |                        | SHOW CREATE TABLE t_single;                       
           | ds_1 SHOW CREATE TABLE t_single;                             | 
SingleTablesRoutingEngine                     | support     |
   |                        | SHOW BINLOG EVENTS                                
           | ds_0 SHOW BINLOG EVENTS;                                     | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW CHARACTER SET LIKE '%GBK%';                  
           | ds_0 SHOW CHARACTER SET LIKE '%GBK%';                        | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW COLLATION LIKE '%GBK%';                      
           | ds_0 SHOW COLLATION LIKE '%GBK%';                            | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW CREATE EVENT test_event;                     
           | ds_0 SHOW CREATE EVENT test_event;                           | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW CREATE FUNCTION test_function;               
           | ds_0 SHOW CREATE FUNCTION test_function;                     | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW CREATE PROCEDURE test_procedure;             
           | ds_0 SHOW CREATE PROCEDURE test_procedure;                   | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW CREATE TRIGGER test_trigger;                 
           |                                                              |     
                                          | not support |
   |                        | SHOW CREATE USER root;                            
           |                                                              |     
                                          | not support |
   |                        | SHOW CREATE VIEW test_view;                       
           | ds_0 SHOW CREATE VIEW test_view;                             | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW ENGINE INNODB STATUS; SHOW ENGINES; SHOW 
CHARSET; SHOW ERRORS LIMIT 1; | ds_0 SHOW ENGINE INNODB STATUS; ds_0 SHOW 
ENGINES; ds_0 SHOW CHARSET; ds_0 SHOW ERRORS LIMIT 1; | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW EVENTS FROM *sharding_db;*                   
           |                                                              |     
                                          | not support |
   |                        | SHOW FUNCTION CODE *test_function*;               
           |                                                              |     
                                          | not support |
   |                        | SHOW FUNCTION STATUS;                             
           |                                                              |     
                                          | not support |
   |                        | SHOW GRANTS FOR root;                             
           |                                                              |     
                                          | not support |
   |                        | SHOW MASTER STATUS;                               
           |                                                              |     
                                          | not support |
   |                        | SHOW PLUGINS;                                     
           |                                                              |     
                                          | not support |
   |                        | SHOW OPEN TABLES FROM *sharding_db;*              
           |                                                              |     
                                          | not support |
   |                        | SHOW PRIVILEGES;                                  
           |                                                              |     
                                          | not support |
   |                        | SHOW PROCEDURE CODE *test_procedure;*             
           |                                                              |     
                                          | not support |
   |                        | SHOW PROCESSLIST;                                 
           | -                                                            |     
                                          | support     |
   |                        | SHOW PROFILE ALL;                                 
           |                                                              |     
                                          | not support |
   |                        | SHOW PROCEDURE STATUS;                            
           |                                                              |     
                                          | not support |
   |                        | SHOW PROFILES;                                    
           |                                                              |     
                                          | not support |
   |                        | SHOW SLAVE HOSTS;                                 
           |                                                              |     
                                          | not support |
   |                        | SHOW SLAVE STATUS;                                
           |                                                              |     
                                          | not support |
   |                        | SHOW RELAYLOG EVENTS;                             
           |                                                              |     
                                          | not support |
   |                        | SHOW GLOBAL STATUS;                               
           | ds_0 SHOW GLOBAL STATUS;                                     | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW TRIGGERS FROM *sharding_db;*                 
           |                                                              |     
                                          | not support |
   |                        | SHOW WARNINGS LIMIT 1;                            
           | ds_0 SHOW WARNINGS LIMIT 1;                                  | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                        | SHOW GLOBAL VARIABLES;                            
           | ds_0 SHOW GLOBAL VARIABLES;                                  | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   | setVariable            | SET GLOBAL a = 1;                                 
           | ds_0 SET GLOBAL a = 1; ds_1 SET GLOBAL a = 1;                | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   | setCharacter           | SET CHARACTER SET UTF8;                           
           | ds_0 SET CHARACTER SET UTF8; ds_1 SET CHARACTER SET UTF8;    | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   | clone                  | CLONE LOCAL DATA DIRECTORY 'plugin';              
           |                                                              |     
                                          | not support |
   | createLoadableFunction | CREATE FUNCTION *test_loadable_function* RETURNS 
STRING SONAME 'abs'; | ds_0 CREATE FUNCTION test_loadable_function RETURNS 
STRING SONAME 'abs'; | ShardingDataSourceGroupBroadcastRoutingEngine | support  
   |
   | install                | INSTALL PLUGIN plugin SONAME 'math';              
           |                                                              |     
                                          | not support |
   | uninstall              | UNINSTALL PLUGIN plugin;                          
           |                                                              |     
                                          | not support |
   | analyzeTable           | ANALYZE TABLE t_order;                            
           | ds_1 ANALYZE TABLE t_order_0; ds_1 ANALYZE TABLE t_order_1; ds_0 
ANALYZE TABLE t_order_0; ds_0 ANALYZE TABLE t_order_1; | 
ShardingTableBroadcastRoutingEngine           | support     |
   |                        | ANALYZE TABLE t_user;                             
           | ds_0 ANALYZE TABLE t_user_0;                                 | 
ShardingTableBroadcastRoutingEngine           | support     |
   |                        | ANALYZE TABLE t_config;                           
           | ds_0 ANALYZE TABLE t_config; ds_1 ANALYZE TABLE t_config;    | 
ShardingTableBroadcastRoutingEngine           | support     |
   |                        | ANALYZE TABLE t_single;                           
           | ds_1 ANALYZE TABLE t_single;                                 | 
SingleTablesRoutingEngine                     | support     |
   | checkTable             | CHECK TABLE t_order FOR UPGRADE;                  
           |                                                              |     
                                          | not support |
   | checksumTable          | CHECKSUM TABLE t_order;                           
           |                                                              |     
                                          | not support |
   | optimizeTable          | OPTIMIZE LOCAL TABLE t_order;                     
           |                                                              |     
                                          | not support |
   | repairTable            | REPAIR LOCAL TABLE t_order;                       
           |                                                              |     
                                          | not support |
   | alterResourceGroup     | ALTER RESOURCE GROUP batch;                       
           |                                                              |     
                                          | not support |
   | createResourceGroup    | CREATE RESOURCE GROUP batch TYPE = USER;          
           |                                                              |     
                                          | not support |
   | dropResourceGroup      | DROP RESOURCE GROUP batch;                        
           |                                                              |     
                                          | not support |
   | setResourceGroup       | SET RESOURCE GROUP batch;                         
           |                                                              |     
                                          | not support |
   | binlog                 | BINLOG 'str';                                     
           |                                                              |     
                                          | not support |
   | cacheIndex             | CACHE INDEX t1, t2, t3 IN hot_cache;              
           |                                                              |     
                                          | not support |
   | flush                  | FLUSH NO_WRITE_TO_BINLOG TABLES t_order;          
           |                                                              |     
                                          | not support |
   | kill                   | KILL QUERY 12;                                    
           |                                                              |     
                                          | not support |
   | loadIndexInfo          | LOAD INDEX INTO CACHE t_1;                        
           |                                                              |     
                                          | not support |
   | resetStatement         | RESET MASTER TO 1234;                             
           |                                                              |     
                                          | not support |
   | restart                | RESTART;                                          
           |                                                              |     
                                          | not support |
   | shutdown               | SHUTDOWN;                                         
           |                                                              |     
                                          | not support |
   
   ### MySQL DCLStatement
   
   | statement      | logic SQL | actual SQL | route engine | supported |
   | -------------- | --------- | ---------- | ------------ | --------- |
   | grant          |           |            |              |           |
   | revoke         |           |            |              |           |
   | createUser     |           |            |              |           |
   | alterUser      |           |            |              |           |
   | dropUser       |           |            |              |           |
   | createRole     |           |            |              |           |
   | dropRole       |           |            |              |           |
   | renameUser     |           |            |              |           |
   | setDefaultRole |           |            |              |           |
   | setRole        |           |            |              |           |
   | setPassword    |           |            |              |           |
   
   ### MySQL DDLStatement
   
   > alterStatement statement include:
   >
   > alterTable, alterDatabase, alterProcedure, alterFunction, alterEvent, 
alterView, alterTablespaceInnodb, alterTablespaceNdb, alterLogfileGroup, 
alterInstance, alterServer
   
   | statement                            | actual SQL                          
                         | logic SQL                                            
        | route engine                        | supported                       
                             |
   | ------------------------------------ | 
------------------------------------------------------------ | 
------------------------------------------------------------ | 
----------------------------------- | 
------------------------------------------------------------ |
   | alterStatement-alterTable            | ALTER TABLE t_order ADD COLUMN 
product_name VARCHAR(20;      | ds_1 ALTER TABLE t_order_0 ADD COLUMN 
product_name VARCHAR(20); ds_1 ALTER TABLE t_order_1 ADD COLUMN product_name 
VARCHAR(20); ds_0 ALTER TABLE t_order_0 ADD COLUMN product_name VARCHAR(20); 
ds_0 ALTER TABLE t_order_1 ADD COLUMN product_name VARCHAR(20); | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                                      | ALTER TABLE t_user ADD COLUMN 
product_name VARCHAR(20);      | ds_0 ALTER TABLE t_user_0 ADD COLUMN 
product_name VARCHAR(20); | ShardingTableBroadcastRoutingEngine | support       
                                               |
   |                                      | ALTER TABLE t_config ADD COLUMN 
product_name VARCHAR(20);    | ds_0 ALTER TABLE t_config ADD COLUMN 
product_name VARCHAR(20); ds_1 ALTER TABLE t_config ADD COLUMN product_name 
VARCHAR(20); | ShardingTableBroadcastRoutingEngine | support                    
                                  |
   |                                      | ALTER TABLE t_single ADD COLUMN 
product_name VARCHAR(20);    | ds_1 ALTER TABLE t_single ADD COLUMN 
product_name VARCHAR(20); | SingleTablesRoutingEngine           | support       
                                               |
   |                                      | ALTER TABLE t_order ADD CONSTRAINT 
FOREIGN KEY order_id_fk(order_id) REFERENCES t_order_item(order_id); | ds_1 
ALTER TABLE t_order_0 ADD CONSTRAINT FOREIGN KEY order_id_fk(order_id) 
REFERENCES t_order_item(order_id); ds_1 ALTER TABLE t_order_1 ADD CONSTRAINT 
FOREIGN KEY order_id_fk(order_id) REFERENCES t_order_item(order_id); ds_0 ALTER 
TABLE t_order_0 ADD CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES 
t_order_item(order_id); ds_0 ALTER TABLE t_order_1 ADD CONSTRAINT FOREIGN KEY 
order_id_fk(order_id) REFERENCES t_order_item(order_id); | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                                      | ALTER TABLE t_order ADD CONSTRAINT 
FOREIGN KEY order_id_fk(order_id) REFERENCES t_config(order_id); | ds_1 ALTER 
TABLE t_order_0 ADD CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES 
t_config(order_id); ds_1 ALTER TABLE t_order_1 ADD CONSTRAINT FOREIGN KEY 
order_id_fk(order_id) REFERENCES t_config(order_id); ds_0 ALTER TABLE t_order_0 
ADD CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES t_config(order_id); 
ds_0 ALTER TABLE t_order_1 ADD CONSTRAINT FOREIGN KEY order_id_fk(order_id) 
REFERENCES t_config(order_id); | ShardingTableBroadcastRoutingEngine | support  
                                                    |
   |                                      | ALTER TABLE t_order RENAME TO 
t_order_new, RENAME TO t_order_new_new; ALTER TABLE t_user RENAME TO 
t_user_new, RENAME TO t_user_new_new; ALTER TABLE t_config RENAME TO 
t_config_new, RENAME TO t_config_new_new; |                                     
                         |                                     | not 
support——ALTER TABLE ... RENAME TO ... statement can not support sharding 
tables and broadcast tables. |
   |                                      | ALTER TABLE t_single RENAME TO 
t_single_new, RENAME TO t_single_new_new; | ds_1 ALTER TABLE t_single RENAME TO 
t_single_new, RENAME TO t_single_new_new; | SingleTablesRoutingEngine           
| support                                                      |
   | alterStatement-alterDatabase         | ALTER DATABASE *sharding_db* 
CHARACTER SET = UTF8;           | ds_0 ALTER DATABASE *sharding_db* CHARACTER 
SET = UTF8; ds_1 ALTER DATABASE *sharding_db* CHARACTER SET = UTF8; | 
ShardingTableBroadcastRoutingEngine | not support                               
                   |
   | alterStatement-alterProcedure        |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterFunction         |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterEvent            |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterView             |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterTablespaceInnodb |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterTablespaceNdb    |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterLogfileGroup     |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterInstance         |                                     
                         |                                                      
        |                                     |                                 
                             |
   | alterStatement-alterServer           |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createTable                          | CREATE TABLE 
t_order_item(order_item_id INT PRIMARY KEY, order_id INT, content VARCHAR(10), 
CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES t_order(order_id)); | 
ds_0 CREATE TABLE t_order_item_0(order_item_id INT PRIMARY KEY, order_id INT, 
content VARCHAR(10), CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES 
t_order_0(order_id)); ds_0 CREATE TABLE t_order_item_1(order_item_id INT 
PRIMARY KEY, order_id INT, content VARCHAR(10), CONSTRAINT FOREIGN KEY 
order_id_fk(order_id) REFERENCES t_order_1(order_id)); ds_1 CREATE TABLE 
t_order_item_0(order_item_id INT PRIMARY KEY, order_id INT, content 
VARCHAR(10), CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES 
t_order_0(order_id)); ds_1 CREATE TABLE t_order_item_1(order_item_id INT 
PRIMARY KEY, order_id INT, content VARCHAR(10), CONSTRAINT FOREIGN KEY 
order_id_fk(order_id) REFERENCES t_order_1(order_id)); | 
ShardingTableBroadcastRoutingEngine | support                             
                          |
   |                                      | CREATE TABLE 
t_order_item(order_item_id INT PRIMARY KEY, order_id INT, content VARCHAR(10), 
CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES t_config(order_id)); | 
ds_1 CREATE TABLE t_order_item_0(order_item_id INT PRIMARY KEY, order_id INT, 
content VARCHAR(10), CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES 
t_config(order_id)); ds_1 CREATE TABLE t_order_item_1(order_item_id INT PRIMARY 
KEY, order_id INT, content VARCHAR(10), CONSTRAINT FOREIGN KEY 
order_id_fk(order_id) REFERENCES t_config(order_id)); ds_0 CREATE TABLE 
t_order_item_0(order_item_id INT PRIMARY KEY, order_id INT, content 
VARCHAR(10), CONSTRAINT FOREIGN KEY order_id_fk(order_id) REFERENCES 
t_config(order_id)); ds_0 CREATE TABLE t_order_item_1(order_item_id INT PRIMARY 
KEY, order_id INT, content VARCHAR(10), CONSTRAINT FOREIGN KEY 
order_id_fk(order_id) REFERENCES t_config(order_id)); | 
ShardingTableBroadcastRoutingEngine | support                                
                       |
   | dropTable                            | DROP TABLE t_order;                 
                         | ds_1 DROP TABLE t_order_0; ds_1 DROP TABLE 
t_order_1; ds_0 DROP TABLE t_order_0; ds_0 DROP TABLE t_order_1; | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                                      | DROP TABLE t_user;                  
                         | ds_0 DROP TABLE t_user_0;                            
        | ShardingTableBroadcastRoutingEngine | support                         
                             |
   |                                      | DROP TABLE t_config;                
                         | ds_0 DROP TABLE t_config; ds_1 DROP TABLE t_config;  
        | ShardingTableBroadcastRoutingEngine | support                         
                             |
   |                                      | DROP TABLE t_single;                
                         | ds_1 DROP TABLE t_single;                            
        | SingleTablesRoutingEngine           | support                         
                             |
   | dropIndex                            | DROP INDEX order_idx ON t_order;    
                         | ds_1 DROP INDEX order_idx_t_order_0 ON t_order_0; 
ds_1 DROP INDEX order_idx_t_order_1 ON t_order_1; ds_0 DROP INDEX 
order_idx_t_order_0 ON t_order_0; ds_0 DROP INDEX order_idx_t_order_1 ON 
t_order_1; | ShardingTableBroadcastRoutingEngine | support                      
                                |
   |                                      | DROP INDEX order_idx ON t_user;     
                         | ds_0 DROP INDEX order_idx_t_user_0 ON t_user_0;      
        | ShardingTableBroadcastRoutingEngine | support                         
                             |
   |                                      | DROP INDEX order_idx ON t_config;   
                         | ds_1 DROP INDEX order_idx_t_config ON t_config; ds_0 
DROP INDEX order_idx_t_config ON t_config; | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                                      | DROP INDEX order_idx ON t_single;   
                         | ds_1 DROP INDEX order_idx_t_single ON t_single;      
        | SingleTablesRoutingEngine           | support                         
                             |
   | truncateTable                        | TRUNCATE TABLE t_order;             
                         | ds_1 TRUNCATE TABLE t_order_0; ds_1 TRUNCATE TABLE 
t_order_1; ds_0 TRUNCATE TABLE t_order_0; ds_0 TRUNCATE TABLE t_order_1; | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                                      | TRUNCATE TABLE t_user;              
                         | ds_0 TRUNCATE TABLE t_user_0;                        
        | ShardingTableBroadcastRoutingEngine | support                         
                             |
   |                                      | TRUNCATE TABLE t_config;            
                         | ds_0 TRUNCATE TABLE t_config; ds_1 TRUNCATE TABLE 
t_config;  | ShardingTableBroadcastRoutingEngine | support                      
                                |
   |                                      | TRUNCATE TABLE t_single;            
                         | ds_1 TRUNCATE TABLE t_single;                        
        | SingleTablesRoutingEngine           | support                         
                             |
   | createIndex                          | CREATE INDEX order_idx ON 
t_order(order_id);                 | ds_1 CREATE INDEX order_idx_t_order_0 ON 
t_order_0(order_id); ds_1 CREATE INDEX order_idx_t_order_1 ON 
t_order_1(order_id); ds_0 CREATE INDEX order_idx_t_order_0 ON 
t_order_0(order_id); ds_0 CREATE INDEX order_idx_t_order_1 ON 
t_order_1(order_id); | ShardingTableBroadcastRoutingEngine | support            
                                          |
   |                                      | CREATE INDEX order_idx ON 
t_user(order_id);                  | ds_0 CREATE INDEX order_idx_t_user_0 ON 
t_user_0(order_id);  | ShardingTableBroadcastRoutingEngine | support            
                                          |
   |                                      | CREATE INDEX order_idx ON 
t_config(order_id);                | ds_0 CREATE INDEX order_idx_t_config ON 
t_config(order_id); ds_1 CREATE INDEX order_idx_t_config ON t_config(order_id); 
| ShardingTableBroadcastRoutingEngine | support                                 
                     |
   |                                      | CREATE INDEX order_idx ON 
t_single(order_id);                | ds_1 CREATE INDEX order_idx_t_single ON 
t_single(order_id);  | SingleTablesRoutingEngine           | support            
                                          |
   | createDatabase                       |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropDatabase                         |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createEvent                          |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropEvent                            |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createFunction                       |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropFunction                         |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createProcedure                      |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropProcedure                        |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createServer                         |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropServer                           |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createView                           |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropView                             |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createTablespaceInnodb               |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createTablespaceNdb                  |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropTablespace                       |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createLogfileGroup                   |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropLogfileGroup                     |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createTrigger                        |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropTrigger                          |                                     
                         |                                                      
        |                                     |                                 
                             |
   | renameTable                          |                                     
                         |                                                      
        |                                     |                                 
                             |
   | createSRSStatement                   |                                     
                         |                                                      
        |                                     |                                 
                             |
   | dropSRSStatement                     |                                     
                         |                                                      
        |                                     |                                 
                             |
   | getDiagnosticsStatement              |                                     
                         |                                                      
        |                                     |                                 
                             |
   | resignalStatement                    |                                     
                         |                                                      
        |                                     |                                 
                             |
   | signalStatement                      |                                     
                         |                                                      
        |                                     |                                 
                             |
   
   ### MySQL DMLStatement
   
   | statement        | logic SQL                                               
       | actual SQL                                                      | 
route engine                               | supported           |
   | ---------------- | 
------------------------------------------------------------ | 
------------------------------------------------------------ | 
-------------------------------------- | ------------------ |
   | insert           | INSERT INTO t_order(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | ds_0 INSERT INTO t_order_1(order_id, content) VALUES 
(1, 'test1'); ds_1 INSERT INTO t_order_1(order_id, content) VALUES (1, 
'test1'); ds_0 INSERT INTO t_order_0(order_id, content) VALUES (2, 'test2'); 
ds_1 INSERT INTO t_order_0(order_id, content) VALUES (2, 'test2'); | 
ShardingStandardRoutingEngine          | support            |
   |                  | INSERT INTO t_user(order_id, content) VALUES (1, 
'test1'), (2, 'test2') | ds_0 INSERT INTO t_user_0(order_id, content) VALUES 
(1, 'test1'), (2, 'test2'); | ShardingStandardRoutingEngine          | support  
          |
   |                  | INSERT INTO t_config(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | ds_0 INSERT INTO t_config(order_id, content) VALUES 
(1, 'test1'), (2, 'test2'); ds_1 INSERT INTO t_config(order_id, content) VALUES 
(1, 'test1'), (2, 'test2'); | ShardingDatabaseBroadcastRoutingEngine | support  
          |
   |                  | INSERT INTO t_single(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | ds_1 INSERT INTO t_single(order_id, content) VALUES 
(1, 'test1'), (2, 'test2'); | SingleTablesRoutingEngine              | support  
          |
   |                  | INSERT INTO t_order(order_id, content) SELECT order_id, 
content FROM t_order_item WHERE order_id = 1; | ds_0 INSERT INTO 
t_order_1(order_id, content) SELECT order_id, content FROM t_order_item_1 WHERE 
order_id = 1; ds_1 INSERT INTO t_order_1(order_id, content) SELECT order_id, 
content FROM t_order_item_1 WHERE order_id = 1; | ShardingStandardRoutingEngine 
         | support            |
   | replace          | REPLACE INTO t_order(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | ds_0 REPLACE INTO t_order_1(order_id, content) VALUES 
(1, 'test1'); ds_1 REPLACE INTO t_order_1(order_id, content) VALUES (1, 
'test1'); ds_0 REPLACE INTO t_order_0(order_id, content) VALUES (2, 'test2'); 
ds_1 REPLACE INTO t_order_0(order_id, content) VALUES (2, 'test2'); | 
ShardingStandardRoutingEngine          | support            |
   |                  | REPLACE INTO t_user(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | ds_0 REPLACE INTO t_user_0(order_id, content) VALUES 
(1, 'test1'), (2, 'test2'); | ShardingStandardRoutingEngine          | support  
          |
   |                  | REPLACE INTO t_config(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | ds_0 REPLACE INTO t_config(order_id, content) VALUES 
(1, 'test1'), (2, 'test2'); ds_1 REPLACE INTO t_config(order_id, content) 
VALUES (1, 'test1'), (2, 'test2'); | ShardingDatabaseBroadcastRoutingEngine | 
support            |
   |                  | REPLACE INTO t_single(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | REPLACE INTO t_single(order_id, content) VALUES (1, 
'test1'), (2, 'test2'); | SingleTablesRoutingEngine              | support      
      |
   |                  | REPLACE INTO t_order(order_id, content) SELECT 
order_id, content FROM t_order_item WHERE order_id = 1; | ds_0 REPLACE INTO 
t_order_1(order_id, content) SELECT order_id, content FROM t_order_item_1 WHERE 
order_id = 1; ds_1 REPLACE INTO t_order_1(order_id, content) SELECT order_id, 
content FROM t_order_item_1 WHERE order_id = 1; | ShardingStandardRoutingEngine 
         | support            |
   | update           | UPDATE t_order SET content = 'test11' WHERE order_id = 
1;    | ds_0 UPDATE t_order_1 SET content = 'test11' WHERE order_id = 1; ds_1 
UPDATE t_order_1 SET content = 'test11' WHERE order_id = 1; | 
ShardingStandardRoutingEngine          | support            |
   |                  | UPDATE t_user SET content = 'test11' WHERE order_id = 
1;     | ds_0 UPDATE t_user_0 SET content = 'test11' WHERE order_id = 1; | 
ShardingStandardRoutingEngine          | support            |
   |                  | UPDATE t_config SET content = 'test11' WHERE order_id = 
1;   | ds_0 UPDATE t_config SET content = 'test11' WHERE order_id = 1; ds_1 
UPDATE t_config SET content = 'test11' WHERE order_id = 1; | 
ShardingDatabaseBroadcastRoutingEngine | support            |
   |                  | UPDATE t_single SET content = 'test11' WHERE order_id = 
1;   | ds_1 UPDATE t_single SET content = 'test11' WHERE order_id = 1; | 
SingleTablesRoutingEngine              | support            |
   | delete           | DELETE FROM t_order WHERE order_id = 1;                 
     | ds_0 DELETE FROM t_order_1 WHERE order_id = 1; ds_1 DELETE FROM 
t_order_1 WHERE order_id = 1; | ShardingStandardRoutingEngine          | 
support            |
   |                  | DELETE FROM t_user WHERE order_id = 1;                  
     | ds_0 DELETE FROM t_user_0 WHERE order_id = 1;                | 
ShardingStandardRoutingEngine          | support            |
   |                  | DELETE FROM t_config WHERE order_id = 1;                
     | ds_0 DELETE FROM t_config WHERE order_id = 1; ds_1 DELETE FROM t_config 
WHERE order_id = 1; | ShardingDatabaseBroadcastRoutingEngine | support          
  |
   |                  | DELETE FROM t_single WHERE order_id = 1;                
     | DELETE FROM t_single WHERE order_id = 1;                     | 
SingleTablesRoutingEngine              | support            |
   | select           | SELECT *** FROM t_order WHERE order_id = 1;             
     | ds_0 SELECT * FROM t_order_1 WHERE order_id = 1 ORDER BY order_id ASC; 
ds_1 SELECT * FROM t_order_1 WHERE order_id = 1 ORDER BY order_id ASC; | 
ShardingStandardRoutingEngine          | support            |
   |                  | SELECT *** FROM t_user WHERE order_id = 1;              
     | ds_0 SELECT * FROM t_user_0 WHERE order_id = 1;              | 
ShardingStandardRoutingEngine          | support            |
   |                  | SELECT *** FROM t_config WHERE order_id = 1;            
     | ds_1 SELECT * FROM t_config WHERE order_id = 1;              | 
ShardingUnicastRoutingEngine           | support            |
   |                  | SELECT *** FROM t_single WHERE order_id = 1;            
     | ds_1 SELECT * FROM t_single WHERE order_id = 1;              | 
SingleTablesRoutingEngine              | support            |
   |                  | SELECT *** FROM t_order WHERE order_id = (SELECT 
order_id FROM t_order_item WHERE t_order_item.order_id = 1); | ds_0 SELECT * 
FROM t_order_1 WHERE order_id = (SELECT order_id FROM t_order_item_1 WHERE 
t_order_item_1.order_id = 1) ORDER BY order_id ASC; ds_1 SELECT * FROM 
t_order_1 WHERE order_id = (SELECT order_id FROM t_order_item_1 WHERE 
t_order_item_1.order_id = 1) ORDER BY order_id ASC; | 
ShardingStandardRoutingEngine          | support            |
   |                  | SELECT *** FROM t_user WHERE order_id = (SELECT 
order_id FROM t_order_item WHERE t_order_item.order_id = 1); | ds_1 SELECT * 
FROM t_user WHERE order_id = (SELECT order_id FROM t_order_item WHERE 
t_order_item.order_id = 1); ds_0 SELECT * FROM t_user WHERE order_id = (SELECT 
order_id FROM t_order_item WHERE t_order_item.order_id = 1); | 
ShardingFederatedRoutingEngine         | support by calcite |
   |                  | SELECT *** FROM t_config WHERE order_id = (SELECT 
order_id FROM t_order_item WHERE t_order_item.order_id = 1); | ds_0 SELECT * 
FROM t_config WHERE order_id = (SELECT order_id FROM t_order_item_1 WHERE 
t_order_item_1.order_id = 1) ORDER BY order_id ASC; ds_1 SELECT * FROM t_config 
WHERE order_id = (SELECT order_id FROM t_order_item_1 WHERE 
t_order_item_1.order_id = 1) ORDER BY order_id ASC; | 
ShardingComplexRoutingEngine           | support            |
   |                  | SELECT *** FROM t_single WHERE order_id = (SELECT 
order_id FROM t_order_item WHERE t_order_item.order_id = 1); | ds_0 SELECT * 
FROM t_single WHERE order_id = (SELECT order_id FROM t_order_item WHERE 
t_order_item.order_id = 1); ds_1 SELECT * FROM t_single WHERE order_id = 
(SELECT order_id FROM t_order_item WHERE t_order_item.order_id = 1); | 
ShardingFederatedRoutingEngine         | support by calcite |
   |                  | SELECT *** FROM t_order JOIN t_order_item ON 
t_order.order_id = t_order_item.order_id WHERE t_order.order_id = 1; | ds_0 
SELECT * FROM t_order_1 JOIN t_order_item_1 ON t_order_1.order_id = 
t_order_item_1.order_id WHERE t_order_1.order_id = 1; ds_1 SELECT * FROM 
t_order_1 JOIN t_order_item_1 ON t_order_1.order_id = t_order_item_1.order_id 
WHERE t_order_1.order_id = 1; | ShardingStandardRoutingEngine          | 
support            |
   |                  | SELECT *** FROM t_user JOIN t_order_item ON 
t_user.order_id = t_order_item.order_id WHERE t_user.order_id = 1; | ds_1 
SELECT * FROM t_user JOIN t_order_item ON t_user.order_id = 
t_order_item.order_id WHERE t_user.order_id = 1; ds_0 SELECT * FROM t_user JOIN 
t_order_item ON t_user.order_id = t_order_item.order_id WHERE t_user.order_id = 
1; | ShardingFederatedRoutingEngine         | support by calcite |
   |                  | SELECT *** FROM t_config JOIN t_order_item ON 
t_config.order_id = t_order_item.order_id WHERE t_config.order_id = 1; | ds_0 
SELECT * FROM t_config JOIN t_order_item_0 ON t_config.order_id = 
t_order_item_0.order_id WHERE t_config.order_id = 1; ds_0 SELECT * FROM 
t_config JOIN t_order_item_1 ON t_config.order_id = t_order_item_1.order_id 
WHERE t_config.order_id = 1; ds_1 SELECT * FROM t_config JOIN t_order_item_0 ON 
t_config.order_id = t_order_item_0.order_id WHERE t_config.order_id = 1; ds_1 
SELECT * FROM t_config JOIN t_order_item_1 ON t_config.order_id = 
t_order_item_1.order_id WHERE t_config.order_id = 1; | 
ShardingComplexRoutingEngine           | support            |
   |                  | SELECT *** FROM t_single JOIN t_order_item ON 
t_single.order_id = t_order_item.order_id WHERE t_single.order_id = 1; | ds_0 
SELECT * FROM t_single JOIN t_order_item ON t_single.order_id = 
t_order_item.order_id WHERE t_single.order_id = 1; ds_1 SELECT * FROM t_single 
JOIN t_order_item ON t_single.order_id = t_order_item.order_id WHERE 
t_single.order_id = 1; | ShardingFederatedRoutingEngine         | support by 
calcite |
   | call             |                                                         
     |                                                              |           
                             |                    |
   | doStatement      |                                                         
     |                                                              |           
                             |                    |
   | handlerStatement |                                                         
     |                                                              |           
                             |                    |
   | importStatement  |                                                         
     |                                                              |           
                             |                    |
   | loadStatement    |                                                         
     |                                                              |           
                             |                    |
   
   ### MySQL RLStatement
   
   | statement             | logic SQL | actual SQL | route engine | supported |
   | ---------------- | ------- | ------- | -------- | -------- |
   | change           |         |         |          |          |
   | startSlave       |         |         |          |          |
   | stopSlave        |         |         |          |          |
   | groupReplication |         |         |          |          |
   | purgeBinaryLog   |         |         |          |          |
   
   ### MySQL TCLStatement
   
   | statement             | logic SQL | actual SQL | route engine | supported |
   | ---------------- | ------- | ------- | -------- | -------- |
   | setTransaction   |         |         |          |          |
   | setAutoCommit    |         |         |          |          |
   | beginTransaction |         |         |          |          |
   | commit           |         |         |          |          |
   | rollback         |         |         |          |          |
   | savepoint        |         |         |          |          |
   | begin            |         |         |          |          |
   | lock             |         |         |          |          |
   | unlock           |         |         |          |          |
   | releaseSavepoint |         |         |          |          |
   | xa               |         |         |          |          |
   
   ### MySQL OtherStatement
   
   | statement              | logic SQL | actual SQL | route engine | supported 
|
   | ----------------- | ------- | ------- | -------- | -------- |
   | preparedStatement |         |         |          |          |
   
   ### PostgreSQL DALStatement
   
   | statement           | logic SQL                                      | 
actual SQL                                                      | route engine  
                                    | supported    |
   | -------------- | -------------------------------------------- | 
------------------------------------------------------------ | 
--------------------------------------------- | ----------- |
   | show           | SHOW ALL;                                    | ds_0 SHOW 
ALL;                                               | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   | set            | SET datestyle TO postgres, dmy;              | ds_0 SET 
datestyle TO postgres, dmy; ds_1 SET datestyle TO postgres, dmy; | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   | resetParameter | RESET ALL;                                   | ds_0 RESET 
ALL; ds_1 RESET ALL;                              | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   | explain        | EXPLAIN SELECT * FROM t_order;               | ds_0 
EXPLAIN SELECT * FROM t_order;                          | 
ShardingUnicastRoutingEngine                  | support     |
   |                | EXPLAIN SELECT *** FROM t_user;              | ds_0 
EXPLAIN SELECT * FROM t_user_0;                         | 
ShardingUnicastRoutingEngine                  | support     |
   |                | EXPLAIN SELECT *** FROM t_config;            | ds_1 
EXPLAIN SELECT *** FROM t_config;                       | 
ShardingUnicastRoutingEngine                  | support     |
   |                | EXPLAIN SELECT *** FROM t_single;            | ds_1 
EXPLAIN SELECT *** FROM t_single;                       | 
SingleTablesRoutingEngine                     | support     |
   | setConstraints | SET CONSTRAINTS ALL DEFERRED;                |            
                                                  |                             
                  | not support |
   | analyze        | ANALYZE;                                     | ds_0 
ANALYZE; ds_1 ANALYZE;                                  | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   |                | ANALYZE t_order;                             | ds_1 
ANALYZE t_order_0; ds_1 ANALYZE t_order_1; ds_0 ANALYZE t_order_0; ds_0 ANALYZE 
t_order_1; | ShardingTableBroadcastRoutingEngine           | support     |
   |                | ANALYZE t_user;                              | ds_0 
ANALYZE t_user_0;                                       | 
ShardingTableBroadcastRoutingEngine           | support     |
   |                | ANALYZE t_config;                            | ds_0 
ANALYZE t_config; ds_1 ANALYZE t_config;                | 
ShardingTableBroadcastRoutingEngine           | support     |
   |                | ANALYZE t_single;                            | ds_1 
ANALYZE t_single;                                       | 
SingleTablesRoutingEngine                     | support     |
   | load           | LOAD 'test';                                 | ds_0 LOAD 
'test'; ds_1 LOAD 'test';                          | 
ShardingDatabaseBroadcastRoutingEngine        | support     |
   | valuesClause   | VALUES (1, 'one'), (2, 'two'), (3, 'three'); |            
                                                  |                             
                  | not support |
   | vacuum         | VACUUM FULL;                                 | ds_0 
VACUUM FULL;                                            | 
ShardingDataSourceGroupBroadcastRoutingEngine | support     |
   |                | VACUUM FULL t_order;                         | ds_0 
VACUUM FULL t_order;                                    |                       
                        | not support |
   
   ### PostgreSQL DDLStatement
   
   | statement                    | logic SQL                                   
                 | actual SQL                                                   
| route engine                        | supported                               
                     |
   | ---------------------------- | 
------------------------------------------------------------ | 
------------------------------------------------------------ | 
----------------------------------- | 
------------------------------------------------------------ |
   | createTable                  | CREATE TABLE t_order(order_id INT PRIMARY 
KEY, content VARCHAR); | ds_1 CREATE TABLE t_order_0(order_id INT PRIMARY KEY, 
content VARCHAR); ds_1 CREATE TABLE t_order_1(order_id INT PRIMARY KEY, content 
VARCHAR); ds_0 CREATE TABLE t_order_0(order_id INT PRIMARY KEY, content 
VARCHAR); ds_0 CREATE TABLE t_order_1(order_id INT PRIMARY KEY, content 
VARCHAR); | ShardingTableBroadcastRoutingEngine | support                       
                               |
   |                              | CREATE TABLE t_user(order_id INT PRIMARY 
KEY, content VARCHAR); | ds_0 CREATE TABLE t_user_0(order_id INT PRIMARY KEY, 
content VARCHAR); | ShardingTableBroadcastRoutingEngine | support               
                                       |
   |                              | CREATE TABLE t_config(order_id INT PRIMARY 
KEY, content VARCHAR); | ds_0 CREATE TABLE t_config(order_id INT PRIMARY KEY, 
content VARCHAR); ds_1 CREATE TABLE t_config(order_id INT PRIMARY KEY, content 
VARCHAR); | ShardingTableBroadcastRoutingEngine | support                       
                               |
   |                              | CREATE TABLE t_single(order_id INT PRIMARY 
KEY, content VARCHAR); | ds_0 CREATE TABLE t_single(order_id INT PRIMARY KEY, 
content VARCHAR); | SingleTablesRoutingEngine           | support               
                                       |
   |                              | CREATE TABLE t_order(order_id INT PRIMARY 
KEY, content VARCHAR, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES 
t_order_item (order_id)); | ds_0 CREATE TABLE t_order_0(order_id INT PRIMARY 
KEY, content VARCHAR, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES 
t_order_item_0 (order_id)); ds_0 CREATE TABLE t_order_1(order_id INT PRIMARY 
KEY, content VARCHAR, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES 
t_order_item_1 (order_id)); ds_1 CREATE TABLE t_order_0(order_id INT PRIMARY 
KEY, content VARCHAR, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES 
t_order_item_0 (order_id)); ds_1 CREATE TABLE t_order_1(order_id INT PRIMARY 
KEY, content VARCHAR, CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES 
t_order_item_1 (order_id)); | ShardingTableBroadcastRoutingEngine | support     
                                                 |
   | createIndex                  | CREATE INDEX t_order_index ON 
t_order(order_id);             | ds_1 CREATE INDEX t_order_index_t_order_0 ON 
t_order_0(order_id); ds_1 CREATE INDEX t_order_index_t_order_1 ON 
t_order_1(order_id); ds_0 CREATE INDEX t_order_index_t_order_0 ON 
t_order_0(order_id); ds_0 CREATE INDEX t_order_index_t_order_1 ON 
t_order_1(order_id); | ShardingTableBroadcastRoutingEngine | support            
                                          |
   |                              | CREATE INDEX t_user_index ON 
t_user(order_id);               | ds_0 CREATE INDEX t_user_index_t_user_0 ON 
t_user_0(order_id); | ShardingTableBroadcastRoutingEngine | support             
                                         |
   |                              | CREATE INDEX t_config_index ON 
t_config(order_id);           | ds_0 CREATE INDEX t_config_index_t_config ON 
t_config(order_id); ds_1 CREATE INDEX t_config_index_t_config ON 
t_config(order_id); | ShardingTableBroadcastRoutingEngine | support             
                                         |
   |                              | CREATE INDEX t_single_index ON 
t_single(order_id)            | ds_1 CREATE INDEX t_single_index_t_single ON 
t_single(order_id); | SingleTablesRoutingEngine           | support             
                                         |
   | createDatabase               |                                             
                 |                                                              
|                                     |                                         
                     |
   | createView                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropDatabase                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTable                   | ALTER TABLE t_order ADD CONSTRAINT 
t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item (order_id); | ds_0 
ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) 
REFERENCES t_order_item_0 (order_id); ds_0 ALTER TABLE t_order_1 ADD CONSTRAINT 
t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item_1 (order_id); ds_1 
ALTER TABLE t_order_0 ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) 
REFERENCES t_order_item_0 (order_id); ds_1 ALTER TABLE t_order_1 ADD CONSTRAINT 
t_order_fk FOREIGN KEY (order_id) REFERENCES t_order_item_1 (order_id); | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                              | ALTER TABLE t_order ADD CONSTRAINT 
t_order_fk FOREIGN KEY (order_id) REFERENCES t_config (order_id); | ds_1 ALTER 
TABLE t_order_0 ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES 
t_config (order_id); ds_1 ALTER TABLE t_order_1 ADD CONSTRAINT t_order_fk 
FOREIGN KEY (order_id) REFERENCES t_config (order_id); ds_0 ALTER TABLE 
t_order_0 ADD CONSTRAINT t_order_fk FOREIGN KEY (order_id) REFERENCES t_config 
(order_id); ds_0 ALTER TABLE t_order_1 ADD CONSTRAINT t_order_fk FOREIGN KEY 
(order_id) REFERENCES t_config (order_id); | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                              | ALTER TABLE t_order RENAME TO t_order_new; 
ALTER TABLE t_user RENAME TO t_user_new; ALTER TABLE t_config RENAME TO 
t_config_new; |                                                              |  
                                   | not support——ERROR:  ALTER TABLE ... 
RENAME TO ... statement can not support sharding tables and broadcast tables. |
   |                              | ALTER TABLE t_single RENAME TO 
t_single_new;                 | ds_1 ALTER TABLE t_single RENAME TO 
t_single_new;            | SingleTablesRoutingEngine           | support        
                                              |
   | alterIndex                   | ALTER INDEX t_order_index SET TABLESPACE 
pg_default;         | ds_1 ALTER INDEX t_order_index_t_order_0 SET TABLESPACE 
pg_default; ds_1 ALTER INDEX t_order_index_t_order_1 SET TABLESPACE pg_default; 
ds_0 ALTER INDEX t_order_index_t_order_0 SET TABLESPACE pg_default; ds_0 ALTER 
INDEX t_order_index_t_order_1 SET TABLESPACE pg_default; | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   |                              | ALTER INDEX t_user_index SET TABLESPACE 
pg_default;          | ds_0 ALTER INDEX t_user_index_t_user_0 SET TABLESPACE 
pg_default; | ShardingTableBroadcastRoutingEngine | support                     
                                 |
   |                              | ALTER INDEX t_config_index SET TABLESPACE 
pg_default;        | ds_0 ALTER INDEX t_config_index_t_config SET TABLESPACE 
pg_default; ds_1 ALTER INDEX t_config_index_t_config SET TABLESPACE pg_default; 
| ShardingTableBroadcastRoutingEngine | support                                 
                     |
   |                              | ALTER INDEX t_single_index SET TABLESPACE 
pg_default;        | ds_1 ALTER INDEX t_single_index_t_single SET TABLESPACE 
pg_default; | ShardingTableBroadcastRoutingEngine | support                     
                                 |
   |                              | ALTER INDEX t_order_index RENAME TO 
t_order_index_new;       | ds_1 ALTER INDEX t_order_index_t_order_0 RENAME TO 
t_order_index_new_t_order_0; ds_1 ALTER INDEX t_order_index_t_order_1 RENAME TO 
t_order_index_new_t_order_1; ds_0 ALTER INDEX t_order_index_t_order_0 RENAME TO 
t_order_index_new_t_order_0; ds_0 ALTER INDEX t_order_index_t_order_1 RENAME TO 
t_order_index_new_t_order_1; | ShardingTableBroadcastRoutingEngine | support    
                                                  |
   |                              | ALTER INDEX t_user_index RENAME TO 
t_user_index_new;         | ds_0 ALTER INDEX t_user_index_t_user_0 RENAME TO 
t_user_index_new_t_user_0; | ShardingTableBroadcastRoutingEngine | support      
                                                |
   |                              | ALTER INDEX t_user_index RENAME TO 
t_user_index_new;         | ds_0 ALTER INDEX t_user_index_t_user_0 RENAME TO 
t_user_index_new_t_user_0; | ShardingTableBroadcastRoutingEngine | support      
                                                |
   |                              | ALTER INDEX t_config_index RENAME TO 
t_config_index_new;     | ds_0 ALTER INDEX t_config_index_t_config RENAME TO 
t_config_index_new_t_config; ds_1 ALTER INDEX t_config_index_t_config RENAME TO 
t_config_index_new_t_config; | ShardingTableBroadcastRoutingEngine | support    
                                                  |
   |                              | ALTER INDEX t_single_index RENAME TO 
t_single_index_new;     | ds_1 ALTER INDEX t_single_index_t_single RENAME TO 
t_single_index_new_t_single; | ShardingTableBroadcastRoutingEngine | support    
                                                  |
   | dropTable                    | DROP TABLE t_order, t_order_item;           
                 | ds_0 DROP TABLE t_order_0, t_order_item_0; ds_0 DROP TABLE 
t_order_1, t_order_item_1; ds_1 DROP TABLE t_order_0, t_order_item_0; ds_1 DROP 
TABLE t_order_1, t_order_item_1; | ShardingTableBroadcastRoutingEngine | 
support                                                      |
   |                              | DROP TABLE t_user;                          
                 | ds_0 DROP TABLE t_user_0;                                    
| ShardingTableBroadcastRoutingEngine | support                                 
                     |
   |                              | DROP TABLE t_config;                        
                 | ds_0 DROP TABLE t_config; ds_1 DROP TABLE t_config;          
| ShardingTableBroadcastRoutingEngine | support                                 
                     |
   |                              | DROP TABLE t_single;                        
                 | ds_1 DROP TABLE t_single;                                    
| SingleTablesRoutingEngine           | support                                 
                     |
   |                              | DROP TABLE t_order, t_user;                 
                 |                                                              
|                                     | not support——ERROR:  DROP TABLE ... 
statement route unit size must be same with primary table 't_order' data node 
size. |
   | dropIndex                    | DROP INDEX t_order_index;                   
                 | ds_1 DROP INDEX t_order_index_t_order_0; ds_1 DROP INDEX 
t_order_index_t_order_1; ds_0 DROP INDEX t_order_index_t_order_0; ds_0 DROP 
INDEX t_order_index_t_order_1; | ShardingTableBroadcastRoutingEngine | support  
                                                    |
   |                              | DROP INDEX t_user_index;                    
                 | ds_0 DROP INDEX t_user_index_t_user_0;                       
| ShardingTableBroadcastRoutingEngine | support                                 
                     |
   |                              | DROP INDEX t_config_index;                  
                 | ds_0 DROP INDEX t_config_index_t_config; ds_1 DROP INDEX 
t_config_index_t_config; | ShardingTableBroadcastRoutingEngine | support        
                                              |
   |                              | DROP INDEX t_single_index;                  
                 | ds_1 DROP INDEX t_single_index;                              
| ShardingTableBroadcastRoutingEngine | support                                 
                     |
   |                              | DROP INDEX 
t_order_index,t_order_item_index;                 | ds_0 DROP INDEX 
t_order_index_t_order_0,t_order_item_index_t_order_item_0; ds_0 DROP INDEX 
t_order_index_t_order_1,t_order_item_index_t_order_item_1; ds_1 DROP INDEX 
t_order_index_t_order_0,t_order_item_index_t_order_item_0; ds_1 DROP INDEX 
t_order_index_t_order_1,t_order_item_index_t_order_item_1; | 
ShardingTableBroadcastRoutingEngine | support                                   
                   |
   | truncateTable                |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterDatabase                |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterOperator                |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterOperatorClass           |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterOperatorFamily          |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterAggregate               |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterCollation               |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterConversion              |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterDefaultPrivileges       |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterDomain                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterEventTrigger            |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterExtension               |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterForeignDataWrapper      |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterGroup                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterLanguage                |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterLargeObject             |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterMaterializedView        |                                             
                 |                                                              
|                                     |                                         
                     |
   | declare                      |                                             
                 |                                                              
|                                     |                                         
                     |
   | executeStmt                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | createMaterializedView       |                                             
                 |                                                              
|                                     |                                         
                     |
   | refreshMatViewStmt           |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterPolicy                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterProcedure               |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterFunction                |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterPublication             |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterRoutine                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterRule                    |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterSequence                |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterServer                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterStatistics              |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterSubscription            |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterSystem                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTablespace              |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTextSearchConfiguration |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTextSearchDictionary    |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTextSearchParser        |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTextSearchTemplate      |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterTrigger                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterType                    |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterUserMapping             |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterView                    |                                             
                 |                                                              
|                                     |                                         
                     |
   | close                        |                                             
                 |                                                              
|                                     |                                         
                     |
   | cluster                      |                                             
                 |                                                              
|                                     |                                         
                     |
   | comment                      |                                             
                 |                                                              
|                                     |                                         
                     |
   | createAccessMethod           |                                             
                 |                                                              
|                                     |                                         
                     |
   | createAggregate              |                                             
                 |                                                              
|                                     |                                         
                     |
   | createCast                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | createCollation              |                                             
                 |                                                              
|                                     |                                         
                     |
   | createConversion             |                                             
                 |                                                              
|                                     |                                         
                     |
   | createDomain                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | createEventTrigger           |                                             
                 |                                                              
|                                     |                                         
                     |
   | createExtension              |                                             
                 |                                                              
|                                     |                                         
                     |
   | createForeignDataWrapper     |                                             
                 |                                                              
|                                     |                                         
                     |
   | createForeignTable           |                                             
                 |                                                              
|                                     |                                         
                     |
   | createFunction               |                                             
                 |                                                              
|                                     |                                         
                     |
   | createLanguage               |                                             
                 |                                                              
|                                     |                                         
                     |
   | createPolicy                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | createProcedure              |                                             
                 |                                                              
|                                     |                                         
                     |
   | createPublication            |                                             
                 |                                                              
|                                     |                                         
                     |
   | createRule                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | createTrigger                |                                             
                 |                                                              
|                                     |                                         
                     |
   | createSequence               |                                             
                 |                                                              
|                                     |                                         
                     |
   | createServer                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | createStatistics             |                                             
                 |                                                              
|                                     |                                         
                     |
   | createSubscription           |                                             
                 |                                                              
|                                     |                                         
                     |
   | createTablespace             |                                             
                 |                                                              
|                                     |                                         
                     |
   | createTextSearch             |                                             
                 |                                                              
|                                     |                                         
                     |
   | createTransform              |                                             
                 |                                                              
|                                     |                                         
                     |
   | createType                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | createUserMapping            |                                             
                 |                                                              
|                                     |                                         
                     |
   | discard                      |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropAccessMethod             |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropAggregate                |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropCast                     |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropCollation                |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropConversion               |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropDomain                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropEventTrigger             |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropExtension                |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropForeignDataWrapper       |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropForeignTable             |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropFunction                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropLanguage                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropMaterializedView         |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropOperator                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropOperatorClass            |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropOperatorFamily           |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropOwned                    |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropPolicy                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropProcedure                |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropPublication              |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropRoutine                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropRule                     |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropSequence                 |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropServer                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropStatistics               |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropSubscription             |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropTablespace               |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropTextSearch               |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropTransform                |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropTrigger                  |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropType                     |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropUserMapping              |                                             
                 |                                                              
|                                     |                                         
                     |
   | dropView                     |                                             
                 |                                                              
|                                     |                                         
                     |
   | importForeignSchema          |                                             
                 |                                                              
|                                     |                                         
                     |
   | listen                       |                                             
                 |                                                              
|                                     |                                         
                     |
   | move                         |                                             
                 |                                                              
|                                     |                                         
                     |
   | prepare                      |                                             
                 |                                                              
|                                     |                                         
                     |
   | deallocate                   |                                             
                 |                                                              
|                                     |                                         
                     |
   | refreshMaterializedView      |                                             
                 |                                                              
|                                     |                                         
                     |
   | reIndex                      |                                             
                 |                                                              
|                                     |                                         
                     |
   | alterForeignTable            |                                             
                 |                                                              
|                                     |                                         
                     |
   | createOperator               |                                             
                 |                                                              
|                                     |                                         
                     |
   | createOperatorClass          |                                             
                 |                                                              
|                                     |                                         
                     |
   | createOperatorFamily         |                                             
                 |                                                              
|                                     |                                         
                     |
   | securityLabelStmt            |                                             
                 |                                                              
|                                     |                                         
                     |
   | unlisten                     |                                             
                 |                                                              
|                                     |                                         
                     |
   
   ### PostgreSQL DMLStatement
   
   | statement                     | logic SQL | actual SQL | route engine | 
supported |
   | ------------------------ | ------- | ------- | -------- | -------- |
   | insert                   |         |         |          |          |
   | update                   |         |         |          |          |
   | delete                   |         |         |          |          |
   | select                   |         |         |          |          |
   | withClause  |         |         |          |  |
   | doStatement |         |         |          |  |
   | lock        |         |         |          |  |
   | checkpoint  |         |         |          |  |
   | copy        |         |         |          |  |
   | fetch       |         |         |          |  |


-- 
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.

To unsubscribe, e-mail: 
[email protected]

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

Reply via email to