MCPcopy Create free account
hub / github.com/apache/arrow / Validate

Method Validate

cpp/src/gandiva/expr_validator.cc:51–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49} // namespace
50
51Status ExprValidator::Validate(const ExpressionPtr& expr) {
52 ARROW_RETURN_IF(expr == nullptr,
53 Status::ExpressionValidationError("Expression cannot be null"));
54
55 Node& root = *expr->root();
56 ARROW_RETURN_NOT_OK(root.Accept(*this));
57
58 // Ensure root's return type match the expression return type. Type
59 // support validation is not required because root type is already supported.
60 ARROW_RETURN_IF(!root.return_type()->Equals(*expr->result()->type()),
61 Status::ExpressionValidationError("Return type of root node ",
62 root.return_type()->ToString(),
63 " does not match that of expression ",
64 expr->result()->type()->ToString()));
65
66 return Status::OK();
67}
68
69Status ExprValidator::Visit(const FieldNode& node) {
70 auto llvm_type = types_->IRType(node.return_type()->id());

Callers 2

MakeMethod · 0.45
MakeMethod · 0.45

Calls 8

OKFunction · 0.50
AcceptMethod · 0.45
EqualsMethod · 0.45
return_typeMethod · 0.45
typeMethod · 0.45
resultMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected