public static boolean sortingOrderHasNonGroupingFields ( DefaultLimitSpec limitSpec , List < DimensionSpec > dimensions ) { for ( OrderByColumnSpec orderSpec : limitSpec . getColumns ( ) ) { int dimIndex = OrderByColumnSpec . getDimIndexForOrderBy ( orderSpec , dimensions ) ; if ( dimIndex < 0 ) { return true ; } } return false ; }
Check if a limitSpec has columns in the sorting order that are not part of the grouping fields represented by dimensions .