TypeInfoFactory.booleanTypeInfo,
FunctionRegistry.getGenericUDFForAnd(),
residuals);
}
GenericUDF genericUDF = expr.getGenericUDF();
if (!(genericUDF instanceof GenericUDFBaseCompare)) {
return expr;
}
ExprNodeDesc expr1 = (ExprNodeDesc) nodeOutputs[0];
ExprNodeDesc expr2 = (ExprNodeDesc) nodeOutputs[1];
ExprNodeDesc[] extracted = ExprNodeDescUtils.extractComparePair(expr1, expr2);
if (extracted == null) {
return expr;
}
if (extracted.length > 2) {
genericUDF = genericUDF.flip();
}
String udfName = genericUDF.getUdfName();
if (!udfNames.contains(genericUDF.getUdfName())) {
return expr;
}
ExprNodeColumnDesc columnDesc = (ExprNodeColumnDesc) extracted[0];
ExprNodeConstantDesc constantDesc = (ExprNodeConstantDesc) extracted[1];