use of org.apache.hadoop.hive.metastore.parser.FilterLexer in project hive by apache.
the class PartFilterExprUtil method getFilterParser.
public static FilterParser getFilterParser(String filter) throws MetaException {
FilterLexer lexer = new FilterLexer(new ANTLRNoCaseStringStream(filter));
CommonTokenStream tokens = new CommonTokenStream(lexer);
FilterParser parser = new FilterParser(tokens);
try {
parser.filter();
} catch (RecognitionException re) {
throw new MetaException("Error parsing partition filter; lexer error: " + lexer.errorMsg + "; exception " + re);
}
if (lexer.errorMsg != null) {
throw new MetaException("Error parsing partition filter : " + lexer.errorMsg);
}
return parser;
}
Aggregations