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

Function ValidateFunctionDescription

cpp/src/arrow/compute/function.cc:370–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370Status ValidateFunctionDescription(const std::string& s) {
371 if (!s.empty() && s.back() == '\n') {
372 return Status::Invalid("description ends with a newline");
373 }
374 constexpr int kMaxLineSize = 78;
375 int cur_line_size = 0;
376 for (const auto c : s) {
377 cur_line_size = (c == '\n') ? 0 : cur_line_size + 1;
378 if (cur_line_size > kMaxLineSize) {
379 return Status::Invalid("description line length exceeds ", kMaxLineSize,
380 " characters");
381 }
382 }
383 return Status::OK();
384}
385
386} // namespace
387

Callers 1

ValidateMethod · 0.85

Calls 4

backMethod · 0.80
InvalidFunction · 0.50
OKFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected