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

        Optional<Map<ColumnHandle, Domain>> domains = constraint.getSummary().getDomains();

        Domain oldEndTimeDomain = handle.getEndTimeConstraint();
        Domain oldStartTimeDomain = handle.getStartTimeConstraint();
        Domain newEndTimeDomain = oldEndTimeDomain;
        Domain newStartTimeDomain = oldStartTimeDomain;

        if (domains.isPresent()) {
            if (domains.get().containsKey(START_TIME_HANDLE)) {
                newStartTimeDomain = domains.get().get(START_TIME_HANDLE).intersect(oldStartTimeDomain);
            }
            if (domains.get().containsKey(END_TIME_HANDLE)) {
                newEndTimeDomain = domains.get().get(END_TIME_HANDLE).intersect(oldEndTimeDomain);
            }
        }

        if (oldEndTimeDomain.equals(newEndTimeDomain) && oldStartTimeDomain.equals(newStartTimeDomain)) {
            return Optional.empty();
        }

        handle = new AtopTableHandle(
                handle.getSchema(),
                handle.getTable(),
                newStartTimeDomain,
                newEndTimeDomain);

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