Skip to content
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

Avoid redundant tail slash check in TrinoRestCatalog #22023

Conversation

takezoe
Copy link
Member

@takezoe takezoe commented May 19, 2024

Description

Avoid redundant path suffix check in TrinoRestCatalog

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) 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}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 19, 2024
@github-actions github-actions bot added the iceberg Iceberg connector label May 19, 2024
@takezoe takezoe force-pushed the avoid-redundant-pathsuffix-check-in-iceberg-rest-catalog branch from 95fdf4f to aa52da7 Compare May 19, 2024 08:56
@takezoe takezoe changed the title Avoid redundant path suffix check in TrinoRestCatalog Avoid redundant tail slash check in TrinoRestCatalog May 19, 2024
@@ -349,9 +349,6 @@ public String defaultTableLocation(ConnectorSession session, SchemaTableName sch
String databaseLocation = (String) properties.get(IcebergSchemaProperties.LOCATION_PROPERTY);
checkArgument(databaseLocation != null, "location must be set for %s", schemaTableName.getSchemaName());

if (databaseLocation.endsWith("/")) {
return databaseLocation + tableName;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This seems to be checked inside appendPath().

@takezoe takezoe force-pushed the avoid-redundant-pathsuffix-check-in-iceberg-rest-catalog branch from aa52da7 to b2b1aea Compare May 19, 2024 11:03
@takezoe takezoe force-pushed the avoid-redundant-pathsuffix-check-in-iceberg-rest-catalog branch from b2b1aea to a0acb32 Compare May 19, 2024 14:19
@ebyhr ebyhr merged commit e7ccdb4 into trinodb:master May 19, 2024
43 checks passed
@github-actions github-actions bot added this to the 449 milestone May 19, 2024
@takezoe takezoe deleted the avoid-redundant-pathsuffix-check-in-iceberg-rest-catalog branch May 19, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

None yet

2 participants