if (type == null) {
throw new SemanticException("Column " + key + " not found");
}
// Create the corresponding hive expression to filter on partition columns.
PrimitiveTypeInfo pti = TypeInfoFactory.getPrimitiveTypeInfo(type);
Converter converter = ObjectInspectorConverters.getConverter(
TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(TypeInfoFactory.stringTypeInfo),
TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(pti));
ExprNodeColumnDesc column = new ExprNodeColumnDesc(pti, key, null, true);
ExprNodeGenericFuncDesc op = makeBinaryPredicate(
operator, column, new ExprNodeConstantDesc(pti, converter.convert(val)));
// If it's multi-expr filter (e.g. a='5', b='2012-01-02'), AND with previous exprs.
expr = (expr == null) ? op : makeBinaryPredicate("and", expr, op);
names.add(key);
}
if (expr == null) continue;