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

Method InferLength

cpp/src/arrow/compute/exec.cc:201–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199} // namespace
200
201Result<int64_t> ExecBatch::InferLength(const std::vector<Datum>& values) {
202 const int64_t length = DoInferLength(values);
203 switch (length) {
204 case kInvalidValues:
205 return Status::Invalid(
206 "Arrays used to construct an ExecBatch must have equal length");
207 case kEmptyInput:
208 return Status::Invalid("Cannot infer ExecBatch length without at least one value");
209 default:
210 break;
211 }
212 return {length};
213}
214
215Result<ExecBatch> ExecBatch::Make(std::vector<Datum> values, int64_t length) {
216 // Infer the length again and/or validate the given length.

Callers

nothing calls this directly

Calls 2

DoInferLengthFunction · 0.85
InvalidFunction · 0.50

Tested by

no test coverage detected