code: static private boolean isInlineLimitPlanNodePossible(AbstractPlanNode pn) {
          if (pn instanceof OrderByPlanNode ||
              pn.getPlanNodeType() == PlanNodeType.AGGREGATE) {
              return true;
          }
          return false;
      }
docs: Inline limit plan node can be applied with ORDER BY node
  and serial aggregation node
  @param pn
  @return