Skip to content

Mixed case identifier support #24551

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

Merged
merged 5 commits into from
Jun 9, 2025

Conversation

agrawalreetika
Copy link
Member

@agrawalreetika agrawalreetika commented Feb 13, 2025

Description

Improves identifier handling (schema, table) to align with SQL standards for better compatibility with case-sensitive and case-normalizing databases, while minimizing SPI-breaking changes.

Motivation and Context

RFC details - prestodb/rfcs#36

  • This PR focuses on generalizing schema and table name handling to better align with SQL standards. As per the current API behavior, identifiers are lowercased by default unless explicitly handled (RFC reference).

  • Column name support and related changes will be addressed in a follow-up PR. Currently, column names are lowercased at the SPI level (ColumnMetadata.java#L45). Removing this generic lowercase conversion will require updates to normalize column names via the metadata API in each connector.

Impact

Improves identifier handling (schema, table) to align with SQL standards for better compatibility with case-sensitive and case-normalizing databases, while minimizing SPI-breaking changes.

Here is how Analysis Time on local Mac with 8GB JVM for EXPLAIN TPCH Queries, tpch-sf100 with (master) and with the PR changes -
image

Test Plan

  • Existing UT passing
  • Added support for Mysql and new UT added for Mysql for when mixed-case support is enabled

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Add mixed case support for schema and table names.

JDBC Driver Changes
* Add mixed case support related catalog property in JDBC connector ``case-sensitive-name-matching``.

MySQL Connector Changes
* Add support for mixed-case in MySQL. It can be enabled by setting ``case-sensitive-name-matching=true`` configuration in the catalog configuration

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Feb 13, 2025
@agrawalreetika agrawalreetika self-assigned this Feb 13, 2025
@agrawalreetika agrawalreetika force-pushed the mixed-case branch 6 times, most recently from 6f127fc to e2f23fd Compare February 17, 2025 15:49
@agrawalreetika agrawalreetika force-pushed the mixed-case branch 10 times, most recently from 1ad263b to bcb3a7c Compare February 25, 2025 09:13
@agrawalreetika agrawalreetika force-pushed the mixed-case branch 3 times, most recently from 0e0c8be to 8e65855 Compare March 8, 2025 16:07
@agrawalreetika agrawalreetika force-pushed the mixed-case branch 3 times, most recently from 8f48ca4 to 63944ed Compare March 15, 2025 20:19
@prestodb-ci
Copy link
Contributor

@ethanyzhang imported this issue into IBM GitHub Enterprise

@agrawalreetika agrawalreetika force-pushed the mixed-case branch 3 times, most recently from b0a5dd9 to 76cb96e Compare March 28, 2025 10:02
@prestodb-ci
Copy link
Contributor

@ethanyzhang imported this issue into IBM GitHub Enterprise

ScrapCodes
ScrapCodes previously approved these changes May 18, 2025
ZacBlanco
ZacBlanco previously approved these changes May 28, 2025
Copy link
Contributor

@ZacBlanco ZacBlanco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this big effort! I have one remaining request about the warnings, otherwise I am happy with this.

ZacBlanco
ZacBlanco previously approved these changes Jun 2, 2025
hantangwangd
hantangwangd previously approved these changes Jun 2, 2025
@agrawalreetika agrawalreetika merged commit 2ba9e27 into prestodb:master Jun 9, 2025
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants