Fokko commented on code in PR #36846:
URL: https://github.com/apache/arrow/pull/36846#discussion_r1295538126
##########
cpp/src/arrow/table.cc:
##########
@@ -502,9 +504,16 @@ Result<std::shared_ptr<Table>> PromoteTableToSchema(const
std::shared_ptr<Table>
continue;
}
- return Status::Invalid("Unable to promote field ", field->name(),
- ": incompatible types: ",
field->type()->ToString(), " vs ",
- current_field->type()->ToString());
+ if (!compute::CanCast(*current_field->type(), *field->type())) {
+ return Status::Invalid("Unable to promote field ", field->name(),
Review Comment:
I went a bit back and forth here, but it looks like this one slipped through
the cracks. I'm okay with changing the above test, but that will change the
previous behavior. (but I think we're okay here)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]