TaoZhiMLND commented on issue #5421:
URL: https://github.com/apache/shardingsphere/issues/5421#issuecomment-623633891


   when configuration is as follows(actual table name use uppercase words), the 
issue above will absent,
   ```
   shardingRule:
     tables:
       t_order:
         actualDataNodes: ds_${0..1}.T_ORDER_${0..1}
         tableStrategy: 
           standard:
             shardingColumn: order_id
             shardingAlgorithm:
               type: INLINE
               props:
                 algorithm.expression: T_ORDER_${order_id % 2}
         keyGenerator:
           type: SNOWFLAKE
           column: order_id
           props:
             worker.id: 123
   ```
   But when TableMetaDataLoader#isTableExist return true, there is another 
error occur from ColumnMetaDataLoader#load.
   Java code is
   ```java
           try (ResultSet resultSet = 
connection.createStatement().executeQuery(generateEmptyResultSQL(table, 
databaseType))) {
               for (String each : columnNames) {
                   
isCaseSensitives.add(resultSet.getMetaData().isCaseSensitive(resultSet.findColumn(each)));
               }
           }
   ```
   
   Exception cause is
   ```
   Error : 933, Position : 38, Sql = SELECT * FROM "T_ORDER_0" WHERE 1 != 1;, 
OriginalSql = SELECT * FROM "T_ORDER_0" WHERE 1 != 1;, Error Msg = ORA-00933: 
SQL 命令未正确结束
   ```
   And this sql can execute successfully in PL/SQL.


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to