| 25 | namespace gandiva { |
| 26 | |
| 27 | FieldDescriptorPtr Annotator::CheckAndAddInputFieldDescriptor(FieldPtr field) { |
| 28 | // If the field is already in the map, return the entry. |
| 29 | auto found = in_name_to_desc_.find(field->name()); |
| 30 | if (found != in_name_to_desc_.end()) { |
| 31 | return found->second; |
| 32 | } |
| 33 | |
| 34 | auto desc = MakeDesc(field, false /*is_output*/); |
| 35 | in_name_to_desc_[field->name()] = desc; |
| 36 | return desc; |
| 37 | } |
| 38 | |
| 39 | FieldDescriptorPtr Annotator::AddOutputFieldDescriptor(FieldPtr field) { |
| 40 | auto desc = MakeDesc(field, true /*is_output*/); |