MCPcopy Create free account
hub / github.com/apache/arrow / StripNonPrefix

Function StripNonPrefix

cpp/src/arrow/dataset/partition.cc:66–73  ·  view source on GitHub ↗

Remove parts of the path after the last filename partition separator. For example, 12_a_part-0.parquet will become 12_a_

Source from the content-addressed store, hash-verified

64// Remove parts of the path after the last filename partition
65// separator. For example, 12_a_part-0.parquet will become 12_a_
66std::string StripNonPrefix(const std::string& path) {
67 std::string v;
68 auto non_prefix_index = path.rfind(kFilenamePartitionSep);
69 if (non_prefix_index != std::string::npos) {
70 v = path.substr(0, non_prefix_index + 1);
71 }
72 return v;
73}
74
75} // namespace
76

Callers 2

ParseKeysMethod · 0.85
InspectMethod · 0.85

Calls 1

substrMethod · 0.80

Tested by

no test coverage detected