-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add filter conditions for 'show partitions from table' syntax #2553
Conversation
dbName = ClusterNamespace.getFullName(getClusterName(), dbName); | ||
} | ||
|
||
analyzeSynTax(analyzer); |
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.
analyze
itself means analyze syntax
, so no need to name like analyzeSynTax
.
analyzeImpl
is better. Like named in other class.
String leftKey = ((SlotRef) subExpr.getChild(0)).getColumnName(); | ||
if (subExpr instanceof BinaryPredicate) { | ||
BinaryPredicate binaryPredicate = (BinaryPredicate) subExpr; | ||
if (leftKey.equalsIgnoreCase("PartitionName") || leftKey.equalsIgnoreCase("State")) { |
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.
You can list the filter name at the beginning of the class like:
private static final String FILTER_PARTITION_NAME = "PartitionName";
So it would be more easy to maintain. And same as "State", "LastConsistencyCheckTime", ...
filterPartitionInfos = Lists.newArrayList(); | ||
for (List<Comparable> partitionInfo : partitionInfos) { | ||
if (partitionInfo.size() != TITLE_NAMES.size()) { | ||
LOG.warn("ParttitionInfos.size() " + partitionInfos.size() |
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 think this is bug and should throw exception?
f47f404
to
80e8a9c
Compare
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.
LGTM
…#2553) Add filter conditions for show partitions from table syntax, to filter partitions needed
…#2553) Add filter conditions for show partitions from table syntax, to filter partitions needed
add filter conditions for show partitions from table syntax, to filter partitions needed