presto-thrift/src/main/java/io/prestosql/plugin/thrift/ThriftMetadata.java/ThriftMetadata/applyFilter
class ThriftMetadata:    @Override
    public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle table, Constraint constraint)
    {
        ThriftTableHandle handle = (ThriftTableHandle) table;

        TupleDomain<ColumnHandle> oldDomain = handle.getConstraint();
        TupleDomain<ColumnHandle> newDomain = oldDomain.intersect(constraint.getSummary());
        if (oldDomain.equals(newDomain)) {
            return Optional.empty();
        }

        handle = new ThriftTableHandle(
                handle.getSchemaName(),
                handle.getTableName(),
                newDomain,
                handle.getDesiredColumns());

        return Optional.of(new ConstraintApplicationResult<>(handle, constraint.getSummary()));
    }