Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Testing] [Don't review] Enable case-senstive identifer support for Kafka connector. #26286

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

Draft
Mariamalmesfer wants to merge 1 commit into prestodb:master
base: master
Choose a base branch
Loading
from Mariamalmesfer:kafka-mixedcase-test

Conversation

Copy link
Contributor

@Mariamalmesfer Mariamalmesfer commented Oct 12, 2025

Description

Motivation and Context

Impact

Test Plan

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
* ... 
* ... 
Hive Connector Changes
* ... 
* ... 

If release note is NOT required, use:

== NO RELEASE NOTE ==

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Oct 12, 2025
Copy link
Contributor

sourcery-ai bot commented Oct 12, 2025
edited
Loading

Reviewer's Guide

This PR adds a new case-sensitive-name-matching configuration option to the Kafka connector, threads it through the metadata layer to control identifier normalization, updates test utilities and query runner code to accept arbitrary connector properties, adjusts existing tests for the new setting, and introduces an integration test suite to verify mixed-case behavior.

Entity relationship diagram for Kafka connector config and metadata

erDiagram
 KAFKA_CONNECTOR_CONFIG {
 boolean caseSensitiveNameMatching
 }
 KAFKA_METADATA {
 boolean caseSensitiveNameMatching
 }
 KAFKA_CONNECTOR_CONFIG ||--o| KAFKA_METADATA: "configures"
Loading

Class diagram for updated KafkaConnectorConfig and KafkaMetadata

classDiagram
 class KafkaConnectorConfig {
 - List<File> resourceConfigFiles
 - boolean caseSensitiveNameMatching
 + boolean isCaseSensitiveNameMatching()
 + KafkaConnectorConfig setCaseSensitiveNameMatching(boolean)
 }
 class KafkaMetadata {
 - boolean caseSensitiveNameMatching
 + String normalizeIdentifier(ConnectorSession, String)
 }
 KafkaConnectorConfig <|-- KafkaMetadata: uses
Loading

File-Level Changes

Change Details Files
Introduce case-sensitive-name-matching config in connector
  • Add boolean field caseSensitiveNameMatching
  • Implement setter with @config and description
  • Add getter for the new property
presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaConnectorConfig.java
Enable identifier normalization based on case sensitivity
  • Inject caseSensitiveNameMatching into KafkaMetadata
  • Override normalizeIdentifier to lower-case or pass through
presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaMetadata.java
Allow passing connector properties in test utilities
  • Overload TestUtils.installKafkaPlugin to accept connectorProperties
  • Merge connectorProperties into catalog config builder
  • Add default overload that passes empty map
presto-kafka/src/test/java/com/facebook/presto/kafka/util/TestUtils.java
Propagate connectorProperties through KafkaQueryRunner
  • Add connectorProperties parameter to createKafkaQueryRunner
  • Pass connectorProperties to createCatalog for tpch and kafka
presto-kafka/src/test/java/com/facebook/presto/kafka/KafkaQueryRunner.java
Update existing tests for new property mapping
  • Include case-sensitive-name-matching in TestKafkaConnectorConfig mappings
  • Use connectorProperties in TestKafkaDistributed and related runners
presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaConnectorConfig.java
presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaDistributed.java
Add integration tests for mixed-case behavior
  • Create TestKafkaIntegrationMixedCase with session setup
  • Verify table existence, queries, describes, shows and information_schema under case-sensitive mode
presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaIntegrationMixedCase.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@steveburnett steveburnett Awaiting requested review from steveburnett steveburnett will be requested when the pull request is marked ready for review steveburnett is a code owner

@elharo elharo Awaiting requested review from elharo elharo will be requested when the pull request is marked ready for review elharo is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

from:IBM PR from IBM

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /