Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1][improvement](jdbc catalog) Optimize JdbcCatalog case mapping stability #43256

Merged
merged 3 commits into from
Dec 26, 2024

Conversation

zy-kkk
Copy link
Member

@zy-kkk zy-kkk commented Nov 5, 2024

cherry-pick #41510

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@zy-kkk zy-kkk marked this pull request as ready for review December 25, 2024 12:27
…ty (apache#41510)

1. Cancel the preservation of name mapping by IdentifierMapping, and only use it as the logic of case processing
2. Save the remote name in ExternalDatabase/ExternalTable object for get
3. Use fromRemoteXXName to process the remote name and map it to the local. Currently, only JdbcExternalCatalog uses IdentifierMapping for processing in this method, and other Catalogs are not processed. If processing is required, it should be extended by yourself
4. When lower_case_meta_name is true, the database, table, and column names mapped remotely to local will be checked to see if they are only case-sensitive.
5. Since Doris's column names are case-insensitive, column names will be checked at any time
6. When Fe config's lower_case_table_names is 1 or 2, the table names mapped from remote to local will be checked for only case-sensitive.
7. include/exclude_database_lists The remote name must be used
8. meta_names_mapping is used to resolve the conflicts mentioned above
9. If the same remoteName is in include_database_lists and meta_names_mapping, the filtered remoteName will be displayed according to the name mapped by meta_names_mapping
10. Since IdentifierMapping is no longer used to store the uppercase and lowercase name mapping, ExternalObject itself is used instead, which solves the problem of frequent refresh and small mapping loss
11. Remove the logic of rebuilding JdbcClient every time refreshCatalog
@zy-kkk
Copy link
Member Author

zy-kkk commented Dec 25, 2024

run buildall

@zy-kkk
Copy link
Member Author

zy-kkk commented Dec 25, 2024

run buildall

@zy-kkk
Copy link
Member Author

zy-kkk commented Dec 25, 2024

run buildall

@morningman morningman merged commit 1396f5a into apache:branch-2.1 Dec 26, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants