code: protected ExtractFromRow createSortingExtractor( Ordering ordering,
                                                       Map<SelectorName, SelectorName> sourceNamesByAlias,
                                                       QueryContext context,
                                                       Columns columns,
                                                       QuerySources sources ) {
          DynamicOperand operand = ordering.getOperand();
          TypeFactory<?> defaultType = context.getTypeSystem().getStringFactory();// only when ordered column is residual or not
                                                                                  // defined
          ExtractFromRow extractor = createExtractFromRow(operand, context, columns, sources, defaultType, false, false);
          return RowExtractors.extractorWith(extractor, ordering.order(), ordering.nullOrder());
      }
docs: Create an {@link ExtractFromRow} instance that produces for given row a single object that can be used to sort all rows in
  the specified order.
  
  @param ordering the specification of the sort order; may not be null or empty
  @param sourceNamesByAlias the map of selector names keyed by their aliases; may not be null but may be empty
  @param context the context in which the query is to be executed; may not be null
  @param columns the result column definition; may not be null
  @param sources the query sources for the repository; may not be null
  @return the extractor; never null