-
Notifications
You must be signed in to change notification settings - Fork 303
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
Case resolver jdbc #2655
base: master
Are you sure you want to change the base?
Case resolver jdbc #2655
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #2655 +/- ##
============================================
+ Coverage 60.68% 60.90% +0.22%
- Complexity 3871 3891 +20
============================================
Files 593 602 +9
Lines 22130 21928 -202
Branches 2732 2702 -30
============================================
- Hits 13430 13356 -74
+ Misses 7398 7263 -135
- Partials 1302 1309 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7e81c5e
to
d9df3ef
Compare
… to expand search capabilities only need to provide information schema query -Clean up duplication code. -Introduce case resolver to FederationSDK -Introduce Default JDBC case resolver for JDBC connectors. If we want to expand search capabilities only need to provide information schema query -Clean up duplication code. -Fix pagination token, return null when empty or last records. Standardize Case resolver support for below JDBC connectors: 1. DataLakeGen2 2. Snowflake 3. Oracle 4. Synapse 5. SapHana 6. MySQL 7. PostGreSql 9. ClickHouse uncomment pom
… mixed cased fix checkstyle
…per case object with casing_mode = CASE_SENSITIVE_SEARCH
d9df3ef
to
ac0155f
Compare
LOWER, // casing mode to lower case everything (glue and trino lower case everything) | ||
UPPER, // casing mode to upper case everything (oracle by default upper cases everything) | ||
CASE_INSENSITIVE_SEARCH, // | ||
ANNOTATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: finish comments here for other two modes
private static final Logger LOGGER = LoggerFactory.getLogger(PostGreSqlJDBCCaseResolver.class); | ||
private static final String SCHEMA_NAME_QUERY_TEMPLATE = "SELECT schema_name FROM information_schema.schemata WHERE lower(schema_name) = ?"; | ||
private static final String TABLE_NAME_QUERY_TEMPLATE = "SELECT table_name FROM information_schema.tables WHERE table_schema = ? AND lower(table_name) = ?"; | ||
private static final String TABLE_NAME_QUERY_MATERIALIZED_VIEW = "select matviewname as \"table_name\" from pg_catalog.pg_matviews mv where schemaname = ? and lower(matviewname) = ?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: SQL keywords are lower case for this but uppercase for other queries
private static final Logger LOGGER = LoggerFactory.getLogger(RedshiftJDBCCaseResolver.class); | ||
private static final String SCHEMA_NAME_QUERY_TEMPLATE = "SELECT nspname FROM pg_namespace WHERE lower(nspname) = ?"; | ||
private static final String TABLE_NAME_QUERY_TEMPLATE = "SELECT table_name FROM information_schema.tables WHERE table_schema = ? AND lower(table_name) = ?"; | ||
private static final String TABLE_NAME_QUERY_EXTERNAL_TABLE = "SELECT tablename as \"table_name\" FROM svv_external_tables where schemaname = ? and lower(tablename) = ?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lower(tablename)
should be lower(table_name)
right?
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.