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

Function ValidateOptions

cpp/src/arrow/compute/kernels/vector_statistics.cc:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42namespace {
43
44Status ValidateOptions(const WinsorizeOptions& options) {
45 if (!(options.lower_limit >= 0 && options.lower_limit <= 1) ||
46 !(options.upper_limit >= 0 && options.upper_limit <= 1)) {
47 return Status::Invalid("winsorize limits must be between 0 and 1");
48 }
49 if (options.lower_limit > options.upper_limit) {
50 return Status::Invalid(
51 "winsorize upper limit must be equal or greater than lower limit");
52 }
53 return Status::OK();
54}
55
56using WinsorizeState = internal::OptionsWrapper<WinsorizeOptions>;
57

Callers 2

ExecMethod · 0.70
ExecChunkedMethod · 0.70

Calls 2

InvalidFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected