presto-main/src/main/java/io/prestosql/spi/expression/ConnectorExpressionTranslator.java/ConnectorToSqlExpressionTranslator/translate
class ConnectorToSqlExpressionTranslator:        public Expression translate(ConnectorExpression expression)
        {
            if (expression instanceof Variable) {
                return variableMappings.get(((Variable) expression).getName()).toSymbolReference();
            }

            if (expression instanceof Constant) {
                return literalEncoder.toExpression(((Constant) expression).getValue(), expression.getType());
            }

            if (expression instanceof FieldDereference) {
                FieldDereference dereference = (FieldDereference) expression;

                RowType type = (RowType) dereference.getTarget().getType();
                String name = type.getFields().get(dereference.getField()).getName().get();
                return new DereferenceExpression(translate(dereference.getTarget()), new Identifier(name));
            }

            throw new UnsupportedOperationException("Expression type not supported: " + expression.getClass().getName());
        }