@Override
protected void validateUDF(ASTNode expr, boolean isFunction, TypeCheckCtx ctx, FunctionInfo fi,
List<ExprNodeDesc> children, GenericUDF genericUDF) throws SemanticException {
super.validateUDF(expr, isFunction, ctx, fi, children, genericUDF);
JoinTypeCheckCtx jCtx = (JoinTypeCheckCtx) ctx;
if (genericUDF instanceof GenericUDFOPOr) {
throw new SemanticException(ErrorMsg.INVALID_JOIN_CONDITION_3.getMsg(expr));
}
if (!(genericUDF instanceof GenericUDFOPAnd)) {
if (!(genericUDF instanceof GenericUDFBaseCompare)) {
if (genericUDFargsRefersToBothInput(genericUDF, children, jCtx.getInputRRList())) {
throw new SemanticException(ErrorMsg.INVALID_JOIN_CONDITION_1.getMsg(expr));
}
} else if (genericUDF instanceof GenericUDFBaseCompare) {
if (children.size() == 2 && !(children.get(0) instanceof ExprNodeConstantDesc)
&& !(children.get(1) instanceof ExprNodeConstantDesc)) {
if (comparisonUDFargsRefersToBothInput((GenericUDFBaseCompare) genericUDF, children,
jCtx.getInputRRList())) {
throw new SemanticException(ErrorMsg.INVALID_JOIN_CONDITION_1.getMsg(expr));
}
}
}
}
}