| 1822 | #endif |
| 1823 | |
| 1824 | Result<int64_t> GetEnvVarInteger(std::string_view name, std::optional<int64_t> min_value, |
| 1825 | std::optional<int64_t> max_value) { |
| 1826 | ARROW_ASSIGN_OR_RAISE(auto env_string, GetEnvVar(name)); |
| 1827 | int64_t value; |
| 1828 | if (!ParseValue<Int64Type>(env_string.data(), env_string.length(), &value) || |
| 1829 | (min_value.has_value() && value < *min_value) || |
| 1830 | (max_value.has_value() && value > *max_value)) { |
| 1831 | return Status::Invalid("Invalid value for ", name, ": '", env_string, "'"); |
| 1832 | } |
| 1833 | return value; |
| 1834 | } |
| 1835 | |
| 1836 | Status SetEnvVar(std::string_view name, std::string_view value) { |
| 1837 | #ifdef _WIN32 |
no test coverage detected