zhjwpku commented on code in PR #812:
URL: https://github.com/apache/iceberg-cpp/pull/812#discussion_r3527465548
##########
src/iceberg/json_serde.cc:
##########
@@ -1377,9 +1377,9 @@ Result<std::unique_ptr<TableMetadata>>
TableMetadataFromJson(const nlohmann::jso
TimePointMs{std::chrono::milliseconds(last_updated_ms)};
if (json.contains(kRefs)) {
- ICEBERG_ASSIGN_OR_RAISE(
- table_metadata->refs,
- FromJsonMap<std::shared_ptr<SnapshotRef>>(json, kRefs,
SnapshotRefFromJson));
+ ICEBERG_ASSIGN_OR_RAISE(auto refs,
FromJsonMap<std::shared_ptr<SnapshotRef>>(
+ json, kRefs, SnapshotRefFromJson));
+ table_metadata->refs = std::move(refs);
Review Comment:
Yeah, this is related to the new RelWithDebInfo coverage: that build exposed
the `-Werror=free-nonheap-object` failure, so this change avoids assigning
directly through `ICEBERG_ASSIGN_OR_RAISE` and fixes the issue surfaced by the
new CI job. I'll update the PR title to make that relationship clearer.
--
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]