docs: private boolean isRHSEligibleForDateRangeOptimization(Expression rhs) {
          return
              rhs.getResultType().isSubTypeOf(libraryBuilder.resolveTypeName("System", "DateTime"))
                  || rhs.getResultType().isSubTypeOf(new IntervalType(libraryBuilder.resolveTypeName("System", "DateTime")));
  
          // BTR: The only requirement for the optimization is that the expression be of type DateTime or Interval<DateTime>
          // Whether or not the expression can be statically evaluated (literal, in the loose sense of the word) is really
          // a function of the engine in determining the "initial" data requirements, versus subsequent data requirements
  //        Element targetElement = rhs;
  //        if (rhs instanceof ParameterRef) {
  //            String paramName = ((ParameterRef) rhs).getName();
  //            for (ParameterDef def : getLibrary().getParameters().getDef()) {
  //                if (paramName.equals(def.getName())) {
  //                    targetElement = def.getParameterTypeSpecifier();
  //                    if (targetElement == null) {
  //                        targetElement = def.getDefault();
  //                    }
  //                    break;
  //                }
  //            }
  //        } else if (rhs instanceof ExpressionRef && !(rhs instanceof FunctionRef)) {
  //            // TODO: Support forward declaration, if necessary
  //            String expName = ((ExpressionRef) rhs).getName();
  //            for (ExpressionDef def : getLibrary().getStatements().getDef()) {
  //                if (expName.equals(def.getName())) {
  //                    targetElement = def.getExpression();
  //                }
  //            }
  //        }
  //
  //        boolean isEligible = false;
  //        if (targetElement instanceof DateTime) {
  //            isEligible = true;
  //        } else if (targetElement instanceof Interval) {
  //            Interval ivl = (Interval) targetElement;
  //            isEligible = (ivl.getLow() != null && ivl.getLow() instanceof DateTime) || (ivl.getHigh() != null && ivl.getHigh() instanceof DateTime);
  //        } else if (targetElement instanceof IntervalTypeSpecifier) {
  //            IntervalTypeSpecifier spec = (IntervalTypeSpecifier) targetElement;
  //            isEligible = isDateTimeTypeSpecifier(spec.getPointType());
  //        } else if (targetElement instanceof NamedTypeSpecifier) {
  //            isEligible = isDateTimeTypeSpecifier(targetElement);
  //        }
  //        return isEligible;
      }