deniskuzZ commented on code in PR #4959: URL: https://github.com/apache/hive/pull/4959#discussion_r1462853338
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java: ########## @@ -263,26 +235,124 @@ public String toString() { public static class LeafNode extends TreeNode { public String keyName; public Operator operator; - /** Constant expression side of the operator. Can currently be a String or a Long. */ + /** + * Constant expression side of the operator. Can currently be a String or a Long. + */ public Object value; public boolean isReverseOrder = false; - private static final String PARAM_PREFIX = "hive_filter_param_"; @Override protected void accept(TreeVisitor visitor) throws MetaException { visitor.visit(this); } @Override - public void generateJDOFilter(Configuration conf, Map<String, Object> params, - FilterBuilder filterBuilder, List<FieldSchema> partitionKeys) throws MetaException { + public String toString() { + return "LeafNode{" + + "keyName='" + keyName + '\'' + + ", operator='" + operator + '\'' + + ", value=" + value + + (isReverseOrder ? ", isReverseOrder=true" : "") + + '}'; + } + + /** + * Get partition column index in the table partition column list that + * corresponds to the key that is being filtered on by this tree node. + * @param partitionKeys list of partition keys. + * @param filterBuilder filter builder used to report error, if any. + * @return The index. + */ + public static int getPartColIndexForFilter(String partitionKeyName, + List<FieldSchema> partitionKeys, FilterBuilder filterBuilder) throws MetaException { + assert (partitionKeys.size() > 0); Review Comment: asserts are not executed. in production code -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org