fe/src/main/java/com/cloudera/impala/catalog/HdfsPartition.java
/**
   * Comparison method to allow ordering of HdfsPartitions by their partition-key values.
   */
Comparison method to allow ordering of HdfsPartitions by their partition-key values.
Comparison method to allow ordering of HdfsPartitions by their partition - key values .
@Override
  public int compareTo(HdfsPartition o) {
    int sizeDiff = partitionKeyValues.size() - o.getPartitionValues().size();
    if (sizeDiff != 0) return sizeDiff;
    for (int i = 0; i < partitionKeyValues.size(); ++i) {
      int cmp = partitionKeyValues.get(i).compareTo(o.getPartitionValues().get(i));
      if (cmp != 0) return cmp;
    }
    return 0;
  }
@ Override public int compareTo ( HdfsPartition o ) { int sizeDiff = partitionKeyValues . size ( ) - o . getPartitionValues ( ) . size ( ) ; if ( sizeDiff != 0 ) return sizeDiff ; for ( int i = 0 ; i < partitionKeyValues . size ( ) ; ++ i ) { int cmp = partitionKeyValues . get ( i ) . compareTo ( o . getPartitionValues ( ) . get ( i ) ) ; if ( cmp != 0 ) return cmp ; } return 0 ; }
Comparison method to allow ordering of HdfsPartitions by their partition-key values.
Comparison method to allow ordering of HdfsPartitions by their partition - key values .