private static Function<SortItem, String> sortItemFormatterFunction() {
    return input -> {
      StringBuilder builder = new StringBuilder();

      builder.append(formatExpression(input.getSortKey()));

      switch (input.getOrdering()) {
        case ASCENDING:
          builder.append(" ASC");
          break;
        case DESCENDING:
          builder.append(" DESC");
          break;
      }

      switch (input.getNullOrdering()) {
        case FIRST:
          builder.append(" NULLS FIRST");
          break;
        case LAST:
          builder.append(" NULLS LAST");
          break;
      }

      return builder.toString();
    };
  }
Returns the formatted `LISTAGG` function call corresponding to the specified node.

<p>During the parsing of the syntax tree, the `LISTAGG` expression is synthetically converted
to a function call. This method formats the specified {@link FunctionCall} node to correspond
to the standardised syntax of the `LISTAGG` expression.

@param node the `LISTAGG` function call
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/ExpressionFormatter.java