code: public SortedGrouping<T> sortGroup(int field, Order order) {
  		if (this.getKeys() instanceof Keys.SelectorFunctionKeys) {
  			throw new InvalidProgramException("KeySelector grouping keys and field index group-sorting keys cannot be used together.");
  		}
  
  		SortedGrouping<T> sg = new SortedGrouping<T>(this.inputDataSet, this.keys, field, order);
  		sg.customPartitioner = getCustomPartitioner();
  		return sg;
  	}
docs: Sorts {@link org.apache.flink.api.java.tuple.Tuple} elements within a group on the specified field in the specified {@link Order}.
  
  <p><b>Note: Only groups of Tuple elements and Pojos can be sorted.</b>
  
  <p>Groups can be sorted by multiple fields by chaining {@link #sortGroup(int, Order)} calls.
  
  @param field The Tuple field on which the group is sorted.
  @param order The Order in which the specified Tuple field is sorted.
  @return A SortedGrouping with specified order of group element.
  
  @see org.apache.flink.api.java.tuple.Tuple
  @see Order