test_class.file: spark-job/src/test/java/org/apache/cassandra/diff/PartitionComparatorTest.java
test_class.identifier: PartitionComparatorTest
test_case.body: @Test
      public void multipleClusteringAllRowsMatching() {
          TableSpec t = spec("table1", names("c1", "c2"), names("v1", "v2"));
          PartitionComparator comparator = comparator(t,
                                                      rows(row(t, 0, 1, 2, 3),
                                                           row(t, 1, 11, 12, 13),
                                                           row(t, 2, 21, 22, 23)),
                                                      rows(row(t, 0, 1, 2, 3),
                                                           row(t, 1, 11, 12, 13),
                                                           row(t, 2, 21, 22, 23)));
          PartitionStats stats = comparator.call();
          assertStats(stats, false, true, 3, 6, 0);
      }
test_case.class_method_signature: PartitionComparatorTest.multipleClusteringAllRowsMatching()
test_case.full_signature: @Test public void multipleClusteringAllRowsMatching()
test_case.identifier: multipleClusteringAllRowsMatching
test_case.invocations: spec names names comparator rows row row row rows row row row call assertStats
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void multipleClusteringAllRowsMatching()
focal_class.declarator: logger = LoggerFactory.getLogger(PartitionComparator.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(PartitionComparator.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: tableSpec
focal_class.modifier: private final
focal_class.original_string: private final TableSpec tableSpec;
focal_class.type: TableSpec
focal_class.var_name: tableSpec
focal_class.declarator: source
focal_class.modifier: private final
focal_class.original_string: private final Iterator<Row> source;
focal_class.type: Iterator<Row>
focal_class.var_name: source
focal_class.declarator: target
focal_class.modifier: private final
focal_class.original_string: private final Iterator<Row> target;
focal_class.type: Iterator<Row>
focal_class.var_name: target
focal_class.declarator: retryStrategyProvider
focal_class.modifier: private final
focal_class.original_string: private final RetryStrategyProvider retryStrategyProvider;
focal_class.type: RetryStrategyProvider
focal_class.var_name: retryStrategyProvider
focal_class.file: spark-job/src/main/java/org/apache/cassandra/diff/PartitionComparator.java
focal_class.identifier: PartitionComparator
focal_class.interfaces: implements Callable<PartitionStats>
focal_class.class_method_signature: PartitionComparator.PartitionComparator(TableSpec tableSpec,
                                 Iterator<Row> source,
                                 Iterator<Row> target,
                                 RetryStrategyProvider retryStrategyProvider)
focal_class.full_signature: public  PartitionComparator(TableSpec tableSpec,
                                 Iterator<Row> source,
                                 Iterator<Row> target,
                                 RetryStrategyProvider retryStrategyProvider)
focal_class.identifier: PartitionComparator
focal_class.modifiers: public
focal_class.parameters: (TableSpec tableSpec,
                                 Iterator<Row> source,
                                 Iterator<Row> target,
                                 RetryStrategyProvider retryStrategyProvider)
focal_class.signature:  PartitionComparator(TableSpec tableSpec,
                                 Iterator<Row> source,
                                 Iterator<Row> target,
                                 RetryStrategyProvider retryStrategyProvider)
focal_class.class_method_signature: PartitionComparator.call()
focal_class.full_signature: public PartitionStats call()
focal_class.identifier: call
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PartitionStats
focal_class.signature: PartitionStats call()
focal_class.class_method_signature: PartitionComparator.hasNextRow(Type type)
focal_class.full_signature: private boolean hasNextRow(Type type)
focal_class.identifier: hasNextRow
focal_class.modifiers: private
focal_class.parameters: (Type type)
focal_class.return: boolean
focal_class.signature: boolean hasNextRow(Type type)
focal_class.class_method_signature: PartitionComparator.getNextRow(Type type)
focal_class.full_signature: private Row getNextRow(Type type)
focal_class.identifier: getNextRow
focal_class.modifiers: private
focal_class.parameters: (Type type)
focal_class.return: Row
focal_class.signature: Row getNextRow(Type type)
focal_class.class_method_signature: PartitionComparator.clusteringsEqual(Row source, Row target)
focal_class.full_signature: private boolean clusteringsEqual(Row source, Row target)
focal_class.identifier: clusteringsEqual
focal_class.modifiers: private
focal_class.parameters: (Row source, Row target)
focal_class.return: boolean
focal_class.signature: boolean clusteringsEqual(Row source, Row target)
focal_class.class_method_signature: PartitionComparator.checkRegularColumnEquality(PartitionStats stats, Row source, Row target)
focal_class.full_signature: private void checkRegularColumnEquality(PartitionStats stats, Row source, Row target)
focal_class.identifier: checkRegularColumnEquality
focal_class.modifiers: private
focal_class.parameters: (PartitionStats stats, Row source, Row target)
focal_class.return: void
focal_class.signature: void checkRegularColumnEquality(PartitionStats stats, Row source, Row target)
focal_method.body: public PartitionStats call() {
          PartitionStats partitionStats = new PartitionStats();
  
          if (source == null || target == null) {
              logger.error("Skipping partition because one result was null (timeout despite retries)");
              partitionStats.skipped = true;
              return partitionStats;
          }
  
          while (hasNextRow(Type.SOURCE) && hasNextRow(Type.TARGET)) {
  
              Row sourceRow = getNextRow(Type.SOURCE);
              Row targetRow = getNextRow(Type.TARGET);
  
              // if primary keys don't match don't proceed any further, just mark the
              // partition as mismatched and be done
              if (!clusteringsEqual(sourceRow, targetRow)) {
                  partitionStats.allClusteringsMatch = false;
                  return partitionStats;
              }
  
              partitionStats.matchedRows++;
  
              // if the rows match, but there are mismatching values in the regular columns
              // we can continue processing the partition, so just flag it as mismatched and continue
              checkRegularColumnEquality(partitionStats, sourceRow, targetRow);
          }
  
          // if one of the iterators isn't exhausted, then there's a mismatch at the partition level
          if (hasNextRow(Type.SOURCE) || hasNextRow(Type.TARGET))
              partitionStats.allClusteringsMatch = false;
  
          return partitionStats;
      }
focal_method.class_method_signature: PartitionComparator.call()
focal_method.full_signature: public PartitionStats call()
focal_method.identifier: call
focal_method.invocations: error hasNextRow hasNextRow getNextRow getNextRow clusteringsEqual checkRegularColumnEquality hasNextRow hasNextRow
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: PartitionStats
focal_method.signature: PartitionStats call()