presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/RaptorMetadata.java/RaptorMetadata/applyFilter
class RaptorMetadata:    @Override
    public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle handle, Constraint constraint)
    {
        RaptorTableHandle table = (RaptorTableHandle) handle;
        TupleDomain<RaptorColumnHandle> newDomain = constraint.getSummary().transform(RaptorColumnHandle.class::cast);

        if (newDomain.equals(table.getConstraint())) {
            return Optional.empty();
        }

        return Optional.of(new ConstraintApplicationResult(
                new RaptorTableHandle(table.getSchemaName(),
                        table.getTableName(),
                        table.getTableId(),
                        table.getDistributionId(),
                        table.getDistributionName(),
                        table.getBucketCount(),
                        table.isOrganized(),
                        table.getTransactionId(),
                        newDomain.intersect(table.getConstraint()),
                        table.getBucketAssignments(),
                        table.isDelete()),
                constraint.getSummary()));
    }