.setMessage(nonAggregateExpression).build().buildException();
}
@Override
public Expression visitLeave(StringConcatParseNode node, List<Expression> children) throws SQLException {
final StringConcatExpression expression=new StringConcatExpression(children);
for (int i = 0; i < children.size(); i++) {
ParseNode childNode=node.getChildren().get(i);
if(childNode instanceof BindParseNode) {
context.getBindManager().addParamMetaData((BindParseNode)childNode,expression);
}
PDataType type=children.get(i).getDataType();
if(type==PDataType.VARBINARY){
throw new SQLExceptionInfo.Builder(SQLExceptionCode.TYPE_NOT_SUPPORTED_FOR_OPERATOR)
.setMessage("Concatenation does not support "+ type +" in expression" + node).build().buildException();
}
}
ImmutableBytesWritable ptr = context.getTempPtr();
if (expression.isStateless()) {
if (!expression.evaluate(null,ptr) || ptr.getLength() == 0) {
return LiteralExpression.newConstant(null, expression.getDataType(), expression.isDeterministic());
}
return LiteralExpression.newConstant(expression.getDataType().toObject(ptr), expression.getDataType(), expression.isDeterministic());
}
return wrapGroupByExpression(expression);
}