Skip to content

Conversation

@jainxrohit
Copy link
Contributor

@jainxrohit jainxrohit commented Nov 15, 2022

Moving ViewDefinition to presto-analyzer, and renamed ConnectorMaterializedViewDefinition to MaterializedViewDefinition in this change.

== RELEASE NOTES ==

SPI Changes
* Rename ``ConnectorMaterializedViewDefinition`` to  ``MaterializedViewDefinition``

@jainxrohit jainxrohit force-pushed the rj_prux branch 5 times, most recently from a91898c to d86e11b Compare November 15, 2022 19:21
@jainxrohit jainxrohit changed the title Move ViewDefinition to presto-common Add MetadataResolver Nov 15, 2022
@kaikalur
Copy link
Contributor

That looks like an odd package to move this class to

@jainxrohit jainxrohit marked this pull request as ready for review November 15, 2022 19:41
@jainxrohit jainxrohit requested a review from a team as a code owner November 15, 2022 19:41
Copy link
Contributor

Choose a reason for hiding this comment

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

could just move the ' into the next string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if I follow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't concatenate a character literal here. Instead the next string can be "', catalog="

Copy link
Contributor

Choose a reason for hiding this comment

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

These methods could use Javadoc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add java doc after one round of review.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps explain what the metadata is instead of simply repeating "Metadata resolver provides metadata". E.g. a metadata resolver provides views and table and column names by querying something"

Copy link
Contributor

Choose a reason for hiding this comment

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

So a table that doesn't exist returns an empty list here? same a a table with no columns that does exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the table does not exist, it would throw exception.

Copy link
Contributor

Choose a reason for hiding this comment

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

That arguably should be a checked exception. Whether it is or not, it definitely needs explicit Javadoc on this point: what exception is thrown under what circumstances

Copy link
Contributor

Choose a reason for hiding this comment

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

needs Javadoc indicating at least where the metadata is coming from

@jainxrohit jainxrohit force-pushed the rj_prux branch 3 times, most recently from 0609188 to 66234ae Compare November 16, 2022 23:06
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

Still reviewing; the first two commits LGTM % one package question

@highker highker self-requested a review November 17, 2022 00:53
Copy link
Contributor

Choose a reason for hiding this comment

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

That arguably should be a checked exception. Whether it is or not, it definitely needs explicit Javadoc on this point: what exception is thrown under what circumstances

Copy link
Contributor

Choose a reason for hiding this comment

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

The first two argument are unclear to me. Consider renaming.

listBuiltInFunctionsOnly might better be no argument at all. Instead have two methods: listBuiltinFunctions and listAllFunctions

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't concatenate a character literal here. Instead the next string can be "', catalog="

Copy link
Contributor

Choose a reason for hiding this comment

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

If there's a reason why some return values are optional and others aren't, I'm missing it.

@jainxrohit jainxrohit force-pushed the rj_prux branch 2 times, most recently from 43a9b87 to 989c5a4 Compare November 18, 2022 19:07
@jainxrohit jainxrohit changed the title Add MetadataResolver Move ViewDefinition to presto-analyzer Nov 18, 2022
@jainxrohit jainxrohit requested review from elharo and highker November 18, 2022 19:25
Moving ViewDefinition to presto-analyzer.
ViewDefinition relies on a few classes from Guava, which is an issue
as this move was leading to presto-spi depending on guava.
Hence guava related classes have been removed from ViewDefinition.
Renaming ConnectorMaterializedViewDefinition to
MaterializedViewDefinition.
@facebook-github-bot
Copy link
Collaborator

@jainxrohit has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jainxrohit jainxrohit merged commit 20e6b25 into prestodb:master Nov 19, 2022
@wanglinsong wanglinsong mentioned this pull request Jan 12, 2023
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants