-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Move ViewDefinition to presto-analyzer #18680
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
Conversation
a91898c to
d86e11b
Compare
|
That looks like an odd package to move this class to |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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="
presto-main/src/main/java/com/facebook/presto/sql/analyzer/BuiltInMetadataResolver.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
0609188 to
66234ae
Compare
highker
left a comment
There was a problem hiding this 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
presto-common/src/main/java/com/facebook/presto/common/ViewDefinition.java
Outdated
Show resolved
Hide resolved
presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/MetadataResolver.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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="
There was a problem hiding this comment.
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.
43a9b87 to
989c5a4
Compare
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.
|
@jainxrohit has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Moving ViewDefinition to presto-analyzer, and renamed ConnectorMaterializedViewDefinition to MaterializedViewDefinition in this change.