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

Remove DeltaLakeGlueMetastoreTableFilterProvider.isDeltaLakeTable #12120

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

homar
Copy link
Member

@homar homar commented Apr 25, 2022

Description

Replace it with DefaultGlueMetastoreTableFilterProvider.isDeltaLakeTable.

Base on b7c07f2 tt looks like we don't want to do it anymore.

fixes: #12013

Related issues, pull requests, and links

Documentation

( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
( ) Release notes entries required with the following suggested text:

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

@cla-bot cla-bot bot added the cla-signed label Apr 25, 2022
@homar homar requested a review from findepi April 25, 2022 08:56
@homar homar force-pushed the homar/remove_unnecesary_todo branch from 02b3683 to 1466095 Compare April 25, 2022 10:42
@@ -51,7 +51,6 @@ private static boolean isDeltaLakeTable(Table table)
if (parameters == null) {
return false;
}
// todo; add parameters == null check to DefaultGlueMetastoreTableFilterProvider.isDeltaLakeTable (https://github.com/trinodb/trino/issues/12013)
Copy link
Member

Choose a reason for hiding this comment

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

remove Map<String, String> parameters = table.getParameters(); above too

Copy link
Member Author

@homar homar Apr 25, 2022

Choose a reason for hiding this comment

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

Why ? To me it is a 'fast path' for returning false. @findepi

Copy link
Member

Choose a reason for hiding this comment

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

it's a code piece that is now redundant. we wouldn't write it originally if DefaultGlueMetastoreTableFilterProvider.isDeltaLakeTable didn't have a problem

actually, the whole method should get inlined now

@homar homar force-pushed the homar/remove_unnecesary_todo branch from 1466095 to 10ac9b2 Compare April 26, 2022 07:53
@homar homar changed the title Remove not longer valid TODO Remove DeltaLakeGlueMetastoreTableFilterProvider.isDeltaLakeTable Apr 26, 2022
@homar
Copy link
Member Author

homar commented Apr 26, 2022

@findepi is it better now?

@@ -40,7 +40,7 @@ public DeltaLakeGlueMetastoreTableFilterProvider(DeltaLakeGlueMetastoreConfig co
public Predicate<Table> get()
{
if (hideNonDeltaLakeTables) {
return DeltaLakeGlueMetastoreTableFilterProvider::isDeltaLakeTable;
return DefaultGlueMetastoreTableFilterProvider::isDeltaLakeTable;
Copy link
Member

Choose a reason for hiding this comment

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

io.trino.plugin.deltalake.metastore.glue.DeltaLakeGlueMetastoreTableFilterProvider#isDeltaLakeTable is now unused

Copy link
Member Author

Choose a reason for hiding this comment

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

:| i pressed cmd+z too many times...

Replace it with DefaultGlueMetastoreTableFilterProvider.isDeltaLakeTable
@homar homar force-pushed the homar/remove_unnecesary_todo branch from 10ac9b2 to e36ea1d Compare April 26, 2022 09:57
@findepi findepi added the no-release-notes This pull request does not require release notes entry label Apr 26, 2022
@findepi findepi merged commit 96a5286 into trinodb:master Apr 26, 2022
@github-actions github-actions bot added this to the 379 milestone Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

DeltaLake add parameters == null check to DefaultGlueMetastoreTableFilterProvider.isDeltaLakeTable
2 participants