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

Function GetParentDirName

be/src/exec/acid-metadata-utils.cc:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34const string DELETE_DELTA_PREFIX = "delete_delta_";
35
36string GetParentDirName(const string& filepath) {
37 int slash_before_file = filepath.rfind('/');
38 if (slash_before_file == string::npos) return "";
39 int slash_before_dirname = filepath.rfind('/', slash_before_file - 1);
40 if (slash_before_dirname == string::npos) return "";
41 return filepath.substr(
42 slash_before_dirname + 1, slash_before_file - slash_before_dirname - 1);
43}
44
45inline string GetFileName(const string& filepath) {
46 std::size_t slash_before_file = filepath.rfind('/');

Callers 3

GetWriteIdRangeMethod · 0.85
GetStatementIdMethod · 0.85
IsCompactedMethod · 0.85

Calls 2

rfindMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected