Skip to content

Navigation Menu

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

Appearance settings

[Do Not Review]Mixed case support for remaining JDBC connectors #25122

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
wants to merge 7 commits into
base: master
Choose a base branch
Loading
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add runtime stats for normalizeIdentifier
  • Loading branch information
agrawalreetika committed May 14, 2025
commit 12412ed5af4fdc96dab6aed1fd9aa5ce37bb0b49
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private RuntimeMetricName()
public static final String GET_CANONICAL_INFO_TIME_NANOS = "getCanonicalInfoTimeNanos";
public static final String FRAGMENT_PLAN_TIME_NANOS = "fragmentPlanTimeNanos";
public static final String GET_LAYOUT_TIME_NANOS = "getLayoutTimeNanos";
public static final String GET_IDENTIFIER_NORMALIZATION_TIME_NANOS = "getIdentifierNormalizationTimeNanos";
public static final String REWRITE_AGGREGATION_IF_TO_FILTER_APPLIED = "rewriteAggregationIfToFilterApplied";
// Time between task creation and start.
public static final String TASK_QUEUED_TIME_NANOS = "taskQueuedTimeNanos";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@

import static com.facebook.airlift.concurrent.MoreFutures.toListenableFuture;
import static com.facebook.presto.SystemSessionProperties.isIgnoreStatsCalculatorFailures;
import static com.facebook.presto.common.RuntimeMetricName.GET_IDENTIFIER_NORMALIZATION_TIME_NANOS;
import static com.facebook.presto.common.RuntimeMetricName.GET_LAYOUT_TIME_NANOS;
import static com.facebook.presto.common.RuntimeMetricName.GET_MATERIALIZED_VIEW_STATUS_TIME_NANOS;
import static com.facebook.presto.common.RuntimeUnit.NANO;
Expand Down Expand Up @@ -1491,13 +1492,16 @@ public void addConstraint(Session session, TableHandle tableHandle, TableConstra
@Override
public String normalizeIdentifier(Session session, String catalogName, String identifier)
{
long startTime = System.nanoTime();
String normalizedString = identifier.toLowerCase(ENGLISH);
Optional<CatalogMetadata> catalogMetadata = getOptionalCatalogMetadata(session, transactionManager, catalogName);
if (catalogMetadata.isPresent()) {
ConnectorId connectorId = catalogMetadata.get().getConnectorId();
ConnectorMetadata metadata = catalogMetadata.get().getMetadataFor(connectorId);
return metadata.normalizeIdentifier(session.toConnectorSession(connectorId), identifier);
normalizedString = metadata.normalizeIdentifier(session.toConnectorSession(connectorId), identifier);
}
return identifier.toLowerCase(ENGLISH);
session.getRuntimeStats().addMetricValue(GET_IDENTIFIER_NORMALIZATION_TIME_NANOS, NANO, System.nanoTime() - startTime);
return normalizedString;
}

private ViewDefinition deserializeView(String data)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.