Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Change from List to Set in order to dedupe records.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsura committed Sep 12, 2017
1 parent afe16ce commit ed1bb85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ private List<MetricSchemaRecord> _getUniqueFastScan(MetricSchemaRecordQuery quer

_logger.info("Using FastScan. Will skip rows while scanning.");

final List<MetricSchemaRecord> records = new ArrayList<>();
final Set<MetricSchemaRecord> records = new TreeSet<>();

final ScanMetadata metadata = _constructScanMetadata(query);
String namespace = SchemaService.convertToRegex(query.getNamespace());
Expand Down Expand Up @@ -390,7 +390,7 @@ private List<MetricSchemaRecord> _getUniqueFastScan(MetricSchemaRecordQuery quer
rows = _getSingleRow(newScanStart, end, filterList, metadata.tableName);
}

return records;
return new ArrayList<>(records);
}


Expand Down

0 comments on commit ed1bb85

Please sign in to comment.