zy-kkk opened a new pull request, #28414:
URL: https://github.com/apache/doris/pull/28414

   ## Proposed changes
   
   Issue Number: close #xxx
   
   This PR enhances the lowercase name synchronization feature in Apache Doris. 
The update focuses on the `lower_case_meta_names` setting, facilitating queries 
to external data sources with mixed case sensitivity in databases, tables, and 
columns using lowercase names in Doris.
   
   ##### Key Updates:
   
   1. **Configuration Refinement**: The configuration name has been updated to 
`lower_case_meta_names` for clarity and to avoid confusion with similar FE 
configuration parameters. This setting is now effective for all databases.
   
   2. **Advanced Synchronization Logic**: Based on the `lower_case_table_names` 
config in FE and the `lower_case_meta_names` setting, the handling of case 
sensitivity in database, table, and column names is as follows:
      - With `lower_case_table_names` set to 0, behavior varies based on 
`lower_case_meta_names`.
      - With `lower_case_table_names` set to 1, database and column case follow 
the source, but table names are stored in lowercase.
      - With `lower_case_table_names` set to 2, the behavior aligns with the 
`lower_case_meta_names` setting.
   
   3. **Conflict Resolution Strategy**: A `suffix_names_mapping` parameter has 
been introduced to resolve conflicts when external data sources have similar 
names differing only in case. This parameter accepts a JSON-formatted string 
for mappings.
   
   4. **JSON Mapping Configuration**: The following is an example of the JSON 
structure used for mapping configurations:
   
       ```sql
       CREATE CATALOG jdbc_oracle PROPERTIES (
           // ... other properties
           "lower_case_meta_names" = "true",
           "suffix_names_mapping" = 
"{\"databases\":[{\"remoteDatabase\":\"DORIS\",\"mapping\":\"doris_1\"},{\"remoteDatabase\":\"doris\",\"mapping\":\"doris_2\"}],\"tables\":[{\"remoteDatabase\":\"DORIS\",\"remoteTable\":\"DORIS\",\"mapping\":\"doris_1\"},{\"remoteDatabase\":\"DORIS\",\"remoteTable\":\"doris\",\"mapping\":\"doris_2\"}],\"columns\":[{\"remoteDatabase\":\"DORIS\",\"remoteTable\":\"DORIS\",\"remoteColumn\":\"DORIS\",\"mapping\":\"doris_1\"},{\"remoteDatabase\":\"DORIS\",\"remoteTable\":\"DORIS\",\"remoteColumn\":\"doris\",\"mapping\":\"doris_2\"}]}"
       );
       ```
   
   5. **Automatic Transition for JDBC Catalog Users**: For users who previously 
set the `lower_case_table_names` parameter in JDBC Catalog, this parameter will 
automatically transition to `lower_case_meta_names` upon upgrading to the 
version containing this PR.
   
   This enhancement significantly improves Doris's capability to interface with 
external data sources having varying case sensitivities, ensuring better 
compatibility and user experience.
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to