-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-22276 Break up DDLSemanticAnalyzer - extract View related analyzers #800
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
jcamachor
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.
I left some minor comments. It looks good overall. It needs rebasing after HIVE-21344 went in.
| static { | ||
| Set<Class<? extends BaseSemanticAnalyzer>> analyzerClasses = | ||
| Set<Class<? extends BaseSemanticAnalyzer>> analyzerClasses1 = | ||
| new Reflections("org.apache.hadoop.hive.ql.ddl").getSubTypesOf(BaseSemanticAnalyzer.class); |
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.
Can we have this String as private static final at the class level?
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.
Fixed.
| public AlterMaterializedViewRewriteDesc(String fqMaterializedViewName, boolean rewriteEnable) { | ||
| this.fqMaterializedViewName = fqMaterializedViewName; | ||
| public AlterMaterializedViewRewriteDesc(String materializedViewName, boolean rewriteEnable) { | ||
| this.materializedViewName = materializedViewName; |
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.
Can we add a comment stating that it is the fully qualified name?
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.
Put back the fq prefix.
ql/src/test/results/clientnegative/materialized_view_no_transactional_rewrite_2.q.out
Outdated
Show resolved
Hide resolved
33b8910 to
f6bfb27
Compare
|
|
||
| import com.google.common.annotations.VisibleForTesting; | ||
|
|
||
| import avro.shaded.com.google.common.collect.Sets; |
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.
We should not use the shaded version.
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.
Fixed.
DDLSemanticAnalyzer is a huge class, more than 4000 lines long. The goal is to refactor it in order to have everything cut into more handleable classes under the package org.apache.hadoop.hive.ql.exec.ddl:
Step #6: extract all the vire related analyzers from DDLSemanticAnalyzer, and move them under the new package.