use of org.apache.phoenix.parse.InListParseNode in project phoenix by apache.
the class ExpressionCompiler method visitLeave.
@Override
public Expression visitLeave(InListParseNode node, List<Expression> l) throws SQLException {
List<Expression> inChildren = l;
Expression firstChild = inChildren.get(0);
ImmutableBytesWritable ptr = context.getTempPtr();
PDataType firstChildType = firstChild.getDataType();
ParseNode firstChildNode = node.getChildren().get(0);
if (firstChildNode instanceof BindParseNode) {
PDatum datum = firstChild;
if (firstChildType == null) {
datum = inferBindDatum(inChildren);
}
context.getBindManager().addParamMetaData((BindParseNode) firstChildNode, datum);
}
for (int i = 1; i < l.size(); i++) {
ParseNode childNode = node.getChildren().get(i);
if (childNode instanceof BindParseNode) {
context.getBindManager().addParamMetaData((BindParseNode) childNode, firstChild);
}
}
return wrapGroupByExpression(InListExpression.create(inChildren, node.isNegate(), ptr, context.getCurrentTable().getTable().rowKeyOrderOptimizable()));
}
Aggregations