Search in sources :

Example 1 with LessThanOrEqualParseNode

use of org.apache.phoenix.parse.LessThanOrEqualParseNode in project phoenix by apache.

the class StatementNormalizer method visitLeave.

@Override
public ParseNode visitLeave(final BetweenParseNode node, List<ParseNode> nodes) throws SQLException {
    LessThanOrEqualParseNode lhsNode = NODE_FACTORY.lte(node.getChildren().get(1), node.getChildren().get(0));
    LessThanOrEqualParseNode rhsNode = NODE_FACTORY.lte(node.getChildren().get(0), node.getChildren().get(2));
    List<ParseNode> parseNodes = Lists.newArrayListWithExpectedSize(2);
    parseNodes.add(this.visitLeave(lhsNode, lhsNode.getChildren()));
    parseNodes.add(this.visitLeave(rhsNode, rhsNode.getChildren()));
    return super.visitLeave(node, parseNodes);
}
Also used : LessThanOrEqualParseNode(org.apache.phoenix.parse.LessThanOrEqualParseNode) BetweenParseNode(org.apache.phoenix.parse.BetweenParseNode) FamilyWildcardParseNode(org.apache.phoenix.parse.FamilyWildcardParseNode) WildcardParseNode(org.apache.phoenix.parse.WildcardParseNode) LessThanOrEqualParseNode(org.apache.phoenix.parse.LessThanOrEqualParseNode) ComparisonParseNode(org.apache.phoenix.parse.ComparisonParseNode) ColumnParseNode(org.apache.phoenix.parse.ColumnParseNode) TableWildcardParseNode(org.apache.phoenix.parse.TableWildcardParseNode) ParseNode(org.apache.phoenix.parse.ParseNode)

Aggregations

BetweenParseNode (org.apache.phoenix.parse.BetweenParseNode)1 ColumnParseNode (org.apache.phoenix.parse.ColumnParseNode)1 ComparisonParseNode (org.apache.phoenix.parse.ComparisonParseNode)1 FamilyWildcardParseNode (org.apache.phoenix.parse.FamilyWildcardParseNode)1 LessThanOrEqualParseNode (org.apache.phoenix.parse.LessThanOrEqualParseNode)1 ParseNode (org.apache.phoenix.parse.ParseNode)1 TableWildcardParseNode (org.apache.phoenix.parse.TableWildcardParseNode)1 WildcardParseNode (org.apache.phoenix.parse.WildcardParseNode)1