| 67 | } |
| 68 | |
| 69 | Status ExprValidator::Visit(const FieldNode& node) { |
| 70 | auto llvm_type = types_->IRType(node.return_type()->id()); |
| 71 | ARROW_RETURN_IF(llvm_type == nullptr, |
| 72 | Status::ExpressionValidationError("Field ", node.field()->name(), |
| 73 | " has unsupported data type ", |
| 74 | node.return_type()->name())); |
| 75 | |
| 76 | // Ensure that field is found in schema |
| 77 | auto field_in_schema_entry = field_map_.find(node.field()->name()); |
| 78 | ARROW_RETURN_IF(field_in_schema_entry == field_map_.end(), |
| 79 | Status::ExpressionValidationError("Field ", node.field()->name(), |
| 80 | " not in schema.")); |
| 81 | |
| 82 | // Ensure that the found field matches. |
| 83 | FieldPtr field_in_schema = field_in_schema_entry->second; |
| 84 | ARROW_RETURN_IF(!field_in_schema->Equals(node.field()), |
| 85 | Status::ExpressionValidationError( |
| 86 | "Field definition in schema ", field_in_schema->ToString(), |
| 87 | " different from field in expression ", node.field()->ToString())); |
| 88 | |
| 89 | return Status::OK(); |
| 90 | } |
| 91 | |
| 92 | Status ExprValidator::Visit(const FunctionNode& node) { |
| 93 | const auto& desc = node.descriptor(); |
nothing calls this directly
no test coverage detected