presto-thrift/src/main/java/io/prestosql/plugin/thrift/ThriftMetadata.java/ThriftMetadata/applyProjection
class ThriftMetadata:    @Override
    public Optional<ProjectionApplicationResult<ConnectorTableHandle>> applyProjection(ConnectorSession session, ConnectorTableHandle table, List<ConnectorExpression> projections, Map<String, ColumnHandle> assignments)
    {
        ThriftTableHandle handle = (ThriftTableHandle) table;

        if (handle.getDesiredColumns().isPresent()) {
            return Optional.empty();
        }

        ImmutableSet.Builder<ColumnHandle> desiredColumns = ImmutableSet.builder();
        ImmutableList.Builder<Assignment> assignmentList = ImmutableList.builder();
        assignments.forEach((name, column) -> {
            desiredColumns.add(column);
            assignmentList.add(new Assignment(name, column, ((ThriftColumnHandle) column).getColumnType()));
        });

        handle = new ThriftTableHandle(
                handle.getSchemaName(),
                handle.getTableName(),
                handle.getConstraint(),
                Optional.of(desiredColumns.build()));

        return Optional.of(new ProjectionApplicationResult<>(handle, projections, assignmentList.build()));
    }