MCPcopy Create free account
hub / github.com/apache/impala / VerifyRowsFromComparisonFile

Function VerifyRowsFromComparisonFile

be/src/exec/tuple-text-file-util.cc:60–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static Status VerifyRowsFromComparisonFile(const string& ref_file_path,
61 ReferenceRowsMap& cache, TupleTextFileReader* reader, int64_t* row_count) {
62 TupleCacheRowFunction verify_fn = [&ref_file_path, &cache, reader](const string& str) {
63 auto iter = cache.find(str);
64 if (iter == cache.end()) {
65 return Status(TErrorCode::TUPLE_CACHE_INCONSISTENCY,
66 Substitute("Result '$0' of file '$1' doesn't exist in the reference file: '$2'",
67 str, reader->GetPath() + DEBUG_TUPLE_CACHE_BAD_POSTFIX,
68 ref_file_path + DEBUG_TUPLE_CACHE_BAD_POSTFIX));
69 }
70 iter->second.comparison_rows_count++;
71 return Status::OK();
72 };
73 return ForEachRow(reader, verify_fn, row_count);
74}
75
76static Status InsertRowsFromReferenceFile(
77 ReferenceRowsMap& cache, TupleTextFileReader* reader, int64_t* row_count) {

Callers 1

VerifyRowsMethod · 0.85

Calls 7

SubstituteFunction · 0.85
OKFunction · 0.85
ForEachRowFunction · 0.85
StatusClass · 0.70
findMethod · 0.45
endMethod · 0.45
GetPathMethod · 0.45

Tested by

no test coverage detected