gty404 commented on code in PR #498:
URL: https://github.com/apache/iceberg-cpp/pull/498#discussion_r2697606885
##########
src/iceberg/update/update_schema.cc:
##########
@@ -327,34 +328,179 @@ UpdateSchema&
UpdateSchema::AddRequiredColumn(std::optional<std::string_view> pa
UpdateSchema& UpdateSchema::UpdateColumn(std::string_view name,
std::shared_ptr<PrimitiveType>
new_type) {
- // TODO(Guotao Yu): Implement UpdateColumn
- AddError(NotImplemented("UpdateSchema::UpdateColumn not implemented"));
+ ICEBERG_BUILDER_ASSIGN_OR_RETURN(auto field_opt, FindFieldForUpdate(name));
+
+ // If not found, check if there's a deleted field with this name
+ if (!field_opt.has_value()) {
Review Comment:
This is to distinguish between conflicting types, whether columns do not
exist at all, or whether deleted columns are updated. I will modify the logic
of FindFieldForUpdate to no longer check the delete list, but check and return
the corresponding conflict information in UpdateColumns, which is consistent
with java
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]