docs: @VisibleForTesting
      public Object optimize(SymbolResolver inputs)
      {
          checkState(optimize, "optimize(SymbolResolver) not allowed for interpreter");
          Object result = expression.accept(visitor, inputs);
  
          if (!(result instanceof RowExpression)) {
              // constant folding
              return result;
          }
          return new ExpressionOptimizer(metadata.getFunctionManager(), session).optimize((RowExpression) result);
      }