docs: public Expression optimizeDateRangeInQuery(Expression where, AliasedQuerySource aqs) {
          if (aqs.getExpression() instanceof Retrieve) {
              Retrieve retrieve = (Retrieve) aqs.getExpression();
              String alias = aqs.getAlias();
              if ((where instanceof IncludedIn || where instanceof In) && attemptDateRangeOptimization((BinaryExpression) where, retrieve, alias)) {
                  where = null;
              }
              else if (where instanceof And && attemptDateRangeOptimization((And) where, retrieve, alias)) {
                  // Now optimize out the trues from the Ands
                  where = consolidateAnd((And) where);
              }
          }
          return where;
      }