code: public int getSortIndexOfOrderByExpression(AbstractExpression partitionByExpression) {
          for (int idx = 0; idx < m_orderByExpressions.size(); ++idx) {
              if (m_orderByExpressions.get(idx).equals(partitionByExpression)) {
                  return idx;
              }
          }
          return -1;
      }
docs: Return the index of the given partition by expression in the
  order by list.  This is used when trying to rationalize partition by
  and order by expressions.
  
  @param partitionByExpression
  @return