[ https://issues.apache.org/jira/browse/HIVE-24458?focusedWorklogId=543802&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-543802 ]
ASF GitHub Bot logged work on HIVE-24458: ----------------------------------------- Author: ASF GitHub Bot Created on: 28/Jan/21 18:45 Start Date: 28/Jan/21 18:45 Worklog Time Spent: 10m Work Description: pgaref commented on a change in pull request #1726: URL: https://github.com/apache/hive/pull/1726#discussion_r566325355 ########## File path: storage-api/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java ########## @@ -330,7 +355,7 @@ public Builder lessThan(String column, PredicateLeaf.Type type, if (column == null || literal == null) { parent.getChildren().add(new ExpressionTree(TruthValue.YES_NO_NULL)); } else { - PredicateLeaf leaf = + PredicateLeafImpl leaf = Review comment: same ########## File path: storage-api/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java ########## @@ -345,7 +370,7 @@ public Builder lessThanEquals(String column, PredicateLeaf.Type type, if (column == null || literal == null) { parent.getChildren().add(new ExpressionTree(TruthValue.YES_NO_NULL)); } else { - PredicateLeaf leaf = + PredicateLeafImpl leaf = Review comment: same on all alteration below.. ########## File path: storage-api/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java ########## @@ -312,12 +338,11 @@ public Builder end() { return this; } - private int addLeaf(PredicateLeaf leaf) { - Integer result = leaves.get(leaf); + private PredicateLeafImpl addLeaf(PredicateLeafImpl leaf) { Review comment: Argument may change to PredicateLeaf? ########## File path: storage-api/src/java/org/apache/hadoop/hive/ql/io/sarg/ExpressionTree.java ########## @@ -31,25 +31,25 @@ public enum Operator {OR, AND, NOT, LEAF, CONSTANT} private final Operator operator; private final List<ExpressionTree> children; - private int leaf; + private final PredicateLeaf leaf; private final SearchArgument.TruthValue constant; ExpressionTree() { operator = null; children = null; - leaf = 0; + leaf = null; constant = null; } ExpressionTree(Operator op, ExpressionTree... kids) { operator = op; - children = new ArrayList<ExpressionTree>(); - leaf = -1; + children = new ArrayList<>(); + leaf = null; this.constant = null; Collections.addAll(children, kids); } - ExpressionTree(int leaf) { + ExpressionTree(SearchArgumentImpl.PredicateLeafImpl leaf) { Review comment: This can now become PredicateLeaf ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 543802) Time Spent: 1h (was: 50m) > Allow access to SArgs without converting to disjunctive normal form > ------------------------------------------------------------------- > > Key: HIVE-24458 > URL: https://issues.apache.org/jira/browse/HIVE-24458 > Project: Hive > Issue Type: Improvement > Reporter: Owen O'Malley > Assignee: Owen O'Malley > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > For some use cases, it is useful to have access to the SArg expression in a > non-normalized form. Currently, the SArg only provides the fully normalized > expression. -- This message was sent by Atlassian Jira (v8.3.4#803005)