use of com.facebook.presto.sql.analyzer.ExpressionAnalyzer in project presto by prestodb.
the class TestRowExpressionSerde method getExpressionTypes.
private Map<NodeRef<Expression>, Type> getExpressionTypes(Expression expression) {
ExpressionAnalyzer expressionAnalyzer = ExpressionAnalyzer.createWithoutSubqueries(metadata.getFunctionAndTypeManager(), TEST_SESSION, TypeProvider.empty(), emptyList(), node -> new IllegalStateException("Unexpected node: %s" + node), WarningCollector.NOOP, false);
expressionAnalyzer.analyze(expression, Scope.create());
return expressionAnalyzer.getExpressionTypes();
}
Aggregations