| 199 | } // namespace |
| 200 | |
| 201 | Result<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 | |
| 215 | Result<ExecBatch> ExecBatch::Make(std::vector<Datum> values, int64_t length) { |
| 216 | // Infer the length again and/or validate the given length. |
nothing calls this directly
no test coverage detected