16#include <fairmq/Message.h>
20#pragma GCC diagnostic push
21#pragma GCC diagnostic ignored "-Wshadow"
23#include <arrow/builder.h>
24#include <arrow/memory_pool.h>
25#include <arrow/record_batch.h>
26#include <arrow/table.h>
27#include <arrow/type_traits.h>
28#include <arrow/status.h>
30#pragma GCC diagnostic pop
39 : mRegistry{registry},
40 mInputsSchema{inputsSchema},
48 for (
size_t i = 0;
i < mInputsSchema.size(); ++
i) {
49 auto& route = mInputsSchema[
i];
50 if (route.timeslice != 0) {
53 if (route.matcher.binding ==
binding) {
63 return getPos(mInputsSchema, matcher).index;
68 size_t inputIndex = 0;
69 for (
const auto& route :
schema) {
70 if (route.timeslice != 0) {
83 return this->
getPos(binding.c_str());
104 auto schemaIndex = 0;
105 for (
size_t i = 0;
i <
schema.size(); ++
i) {
108 if (route.timeslice != 0) {
111 if (inputIndex ==
pos) {
122 for (
size_t i = 0;
i <
size();
i++) {
124 if (
ref.header !=
nullptr) {
125 ref.spec = &mInputsSchema[
i].matcher;
129 if (throwOnFailure) {
137 if (pos < 0 || pos >= mSpan.
size()) {
150 if (
ref.header ==
nullptr) {
162 if (
ref.header ==
nullptr) {
171 for (
auto&& _ : *
this) {
177[[nodiscard]] std::string InputRecord::describeAvailableInputs()
const
179 std::stringstream ss;
180 ss <<
"Available inputs: ";
182 for (
auto const& route : mInputsSchema) {
186 ss << route.matcher.binding;
std::shared_ptr< arrow::Schema > schema
Defining PrimaryVertex explicitly as messageable.
RuntimeErrorRef runtime_error_f(const char *,...)
static bool match(InputSpec const &spec, ConcreteDataMatcher const &target)