Skip to content

Add ConnectorIdentifier to Connector#28359

Closed
prrvchr wants to merge 1 commit intotrinodb:masterfrom
prrvchr:fix#28356
Closed

Add ConnectorIdentifier to Connector#28359
prrvchr wants to merge 1 commit intotrinodb:masterfrom
prrvchr:fix#28356

Conversation

@prrvchr
Copy link
Member

@prrvchr prrvchr commented Feb 18, 2026

Description

I am trying to add a functional comparator for identifiers that support delimiters.
The new class ConnectorIdentifier is intended to do so. It also allows the connector to know whether the DDL commands for which it is responsible should be executed with delimited identifiers or not.

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`28356`)

@cla-bot cla-bot bot added the cla-signed label Feb 18, 2026
@github-actions github-actions bot added druid Druid connector exasol Exasol connector ignite Ignite connector oracle Oracle connector labels Feb 18, 2026
@prrvchr prrvchr force-pushed the fix#28356 branch 3 times, most recently from e363612 to 291d021 Compare February 19, 2026 03:21
@github-actions github-actions bot added iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector bigquery BigQuery connector mongodb MongoDB connector blackhole Blackhole connector clickhouse ClickHouse connector duckdb DuckDB connector faker Faker connector mariadb MariaDB connector memory Memory connector mysql MySQL connector singlestore SingleStore connector sqlserver SQLServer connector vertica Vertica connector lakehouse labels Feb 19, 2026
@ebyhr ebyhr removed their request for review February 19, 2026 03:29
@prrvchr
Copy link
Member Author

prrvchr commented Feb 19, 2026

@wendigo Here's how it's possible to switch to mixed case with Trino while maintaining a minimum of backward compatibility. This requires more changes than expected and is only implemented for views.
Thanks for your feedback.

Comment on lines +24 to +27
public class ConnectorIdentifier
{
private final String value;
private final boolean delimited;
Copy link
Member

Choose a reason for hiding this comment

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

Names coming from connectors don't have a delimited / non-delimited characteristic. They are already canonicalized. The delimited characteristic only pertains to identifiers parsed from a SQL query, and matters only for deciding how to match identifiers to names.

Copy link
Member Author

Choose a reason for hiding this comment

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

Names coming from connectors don't have a delimited / non-delimited characteristic.

Regarding the identifiers coming from the connectors, I agree. But here we're talking about identifiers coming from Trino tasks and destined for the connectors in order to execute the appropriate DDL commands.

If we want to be able to manage delimited and undelimited identifiers and compare them according to the underlying database rules. For example:

  • in HsqlDB (uppercase) "PUBLIC".Table1 is the same identifier as public."TABLE1"

  • in SQLite (lowercase) "main".Table1 is the same identifier as MAIN."table1"

If we need to test whether a schema exists before its creation, I don't see any other way without using the ConnectorIdentifier class, which allows these comparisons between identifiers.

I'd like you to explain how you plan to solve this problem, because so far I haven't found anything better?

Copy link
Member Author

@prrvchr prrvchr Feb 20, 2026

Choose a reason for hiding this comment

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

@martint I think I understand what you were trying to tell me.

You're saying that Trino must normalize (ie: canonalize) all undelimited identifiers and that, therefore, all identifiers received by connectors must be considered as delimited identifiers.

Can you confirm this? Please excuse my lack of understanding.

@github-actions github-actions bot added the postgresql PostgreSQL connector label Feb 19, 2026
@prrvchr prrvchr requested a review from martint February 20, 2026 09:55
@prrvchr
Copy link
Member Author

prrvchr commented Feb 28, 2026

I got a little sidetracked, I'm closing this.

@prrvchr prrvchr closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bigquery BigQuery connector blackhole Blackhole connector cla-signed clickhouse ClickHouse connector delta-lake Delta Lake connector druid Druid connector duckdb DuckDB connector exasol Exasol connector faker Faker connector hive Hive connector iceberg Iceberg connector ignite Ignite connector lakehouse mariadb MariaDB connector memory Memory connector mongodb MongoDB connector mysql MySQL connector oracle Oracle connector postgresql PostgreSQL connector redshift Redshift connector singlestore SingleStore connector sqlserver SQLServer connector vertica Vertica connector

Development

Successfully merging this pull request may close these issues.

Connectors need to know whether an identifier is delimited or not

2 participants