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

Method ParseVersionMajor

cpp/src/parquet/metadata.cc:1454–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1452 }
1453
1454 bool ParseVersionMajor() {
1455 size_t version_major_start = 0;
1456 auto version_major_end = version_string_.find_first_not_of(digits_);
1457 // MAJOR only.
1458 if (version_major_end == std::string::npos) {
1459 version_major_end = version_string_.size();
1460 version_parsing_position_ = version_major_end;
1461 } else {
1462 // No ".".
1463 if (version_string_[version_major_end] != '.') {
1464 return false;
1465 }
1466 // No MAJOR.
1467 if (version_major_end == version_major_start) {
1468 return false;
1469 }
1470 version_parsing_position_ = version_major_end + 1; // +1 is for '.'.
1471 }
1472 auto version_major_string = version_string_.substr(
1473 version_major_start, version_major_end - version_major_start);
1474 application_version_.version.major = atoi(version_major_string.c_str());
1475 return true;
1476 }
1477
1478 bool ParseVersionMinor() {
1479 auto version_minor_start = version_parsing_position_;

Callers

nothing calls this directly

Calls 2

substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected