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

Function ValidateOptions

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

Source from the content-addressed store, hash-verified

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

Callers 2

ExecMethod · 0.70
ExecChunkedMethod · 0.70

Calls 2

InvalidFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected