| 156 | } |
| 157 | |
| 158 | Result<compute::Expression> SubstraitCall::GetValueArg(int index) const { |
| 159 | if (index >= size_) { |
| 160 | return Status::Invalid("Expected Substrait call to have a value argument at index ", |
| 161 | index, " but it did not have enough arguments"); |
| 162 | } |
| 163 | auto value_arg_it = value_args_.find(index); |
| 164 | if (value_arg_it == value_args_.end()) { |
| 165 | return Status::Invalid("Expected Substrait call to have a value argument at index ", |
| 166 | index, " but the argument was not a value"); |
| 167 | } |
| 168 | return value_arg_it->second; |
| 169 | } |
| 170 | |
| 171 | bool SubstraitCall::HasValueArg(int index) const { |
| 172 | return value_args_.find(index) != value_args_.end(); |