docs: protected PlanNode attachLimits( QueryContext context,
                                       PlanNode plan,
                                       Limit limit ) {
          if (limit.isUnlimited()) return plan;
          context.getHints().hasLimit = true;
          PlanNode limitNode = new PlanNode(Type.LIMIT);
  
          boolean attach = false;
          if (limit.getOffset() != 0) {
              limitNode.setProperty(Property.LIMIT_OFFSET, limit.getOffset());
              attach = true;
          }
          if (!limit.isUnlimited()) {
              limitNode.setProperty(Property.LIMIT_COUNT, limit.getRowLimit());
              attach = true;
          }
          if (attach) {
              limitNode.addLastChild(plan);
              plan = limitNode;
          }
          return plan;
      }