use of com.facebook.presto.plugin.jdbc.JdbcColumnHandle in project presto by prestodb.
the class JdbcFilterToSqlTranslator method translateVariable.
@Override
public TranslatedExpression<JdbcExpression> translateVariable(VariableReferenceExpression variable, Map<VariableReferenceExpression, ColumnHandle> context, RowExpressionTreeTranslator<JdbcExpression, Map<VariableReferenceExpression, ColumnHandle>> rowExpressionTreeTranslator) {
JdbcColumnHandle columnHandle = (JdbcColumnHandle) context.get(variable);
requireNonNull(columnHandle, format("Unrecognized variable %s", variable));
return new TranslatedExpression<>(Optional.of(new JdbcExpression(quote + columnHandle.getColumnName().replace(quote, quote + quote) + quote)), variable, ImmutableList.of());
}
Aggregations