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

   ## Feature Request
   
   By default, ShardingSphere metadata is not case sensitive when processing 
table names and column names. This may cause some problems on case-sensitive 
databases.
   
   ```java
   /**
    * ShardingSphere schema.
    */
   @Getter
   public final class ShardingSphereSchema {
       
       private final Map<String, TableMetaData> tables;
       
       @SuppressWarnings("CollectionWithoutInitialCapacity")
       public ShardingSphereSchema() {
           tables = new ConcurrentHashMap<>();
       }
       
       public ShardingSphereSchema(final Map<String, TableMetaData> tables) {
           this.tables = new ConcurrentHashMap<>(tables.size(), 1);
           tables.forEach((key, value) -> this.tables.put(key.toLowerCase(), 
value));
       }
       ...
   }
   
   /**
    * Federation schema meta data.
    */
   @Getter
   public final class FederationSchemaMetaData {
       
       private final String name;
       
       private final Map<String, FederationTableMetaData> tables = new 
LinkedHashMap<>();
       
       public FederationSchemaMetaData(final String name, final Map<String, 
TableMetaData> metaData) {
           this.name = name;
           for (Entry<String, TableMetaData> entry : metaData.entrySet()) {
               tables.put(entry.getKey(), new 
FederationTableMetaData(entry.getValue().getName(), entry.getValue()));
           }
       }
       
       /**
        * Renew.
        * 
        * @param metaData meta data
        */
       @Synchronized
       public void renew(final TableMetaData metaData) {
           tables.put(metaData.getName().toLowerCase(), new 
FederationTableMetaData(metaData.getName(), metaData));
       }
       ...
   }
   ```
   
   Therefore, it is hoped that ShardingSphere can dynamically handle case 
sensitivity according to the database configuration. 
   
   ### Is your feature request related to a problem?
   
   No related problem.
   
   ### Describe the feature you would like.
   
   supporting case sensitivity of table and column names in ShardingSphere 
metadata
   


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