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

Function DoRegex

cpp/src/arrow/dataset/partition_test.cc:1079–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077 }
1078
1079 static Status DoRegex(const std::string& segment, std::smatch* matches) {
1080 static std::regex re(
1081 "^"
1082 "([\\[\\(])" // open bracket or paren
1083 "([^ ]+)" // representation of range minimum
1084 " "
1085 "([^ ]+)" // representation of range maximum
1086 "([\\]\\)])" // close bracket or paren
1087 "$");
1088
1089 if (!std::regex_match(segment, *matches, re) || matches->size() != 5) {
1090 return Status::Invalid("regex failed to parse");
1091 }
1092
1093 return Status::OK();
1094 }
1095
1096 Result<PartitionPathFormat> Format(const compute::Expression&) const override {
1097 return PartitionPathFormat{"", ""};

Callers 1

ParseFunction · 0.85

Calls 3

InvalidFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected