use of com.facebook.presto.expressions.translator.RowExpressionTreeTranslator in project presto by prestodb.
the class JdbcFilterToSqlTranslator method translateCall.
@Override
public TranslatedExpression<JdbcExpression> translateCall(CallExpression call, Map<VariableReferenceExpression, ColumnHandle> context, RowExpressionTreeTranslator<JdbcExpression, Map<VariableReferenceExpression, ColumnHandle>> rowExpressionTreeTranslator) {
List<TranslatedExpression<JdbcExpression>> translatedExpressions = call.getArguments().stream().map(expression -> rowExpressionTreeTranslator.rewrite(expression, context)).collect(toImmutableList());
FunctionMetadata functionMetadata = functionMetadataManager.getFunctionMetadata(call.getFunctionHandle());
try {
return functionTranslator.translate(functionMetadata, call, translatedExpressions);
} catch (Throwable t) {
// no-op
}
return untranslated(call, translatedExpressions);
}
Aggregations