Repository navigation
[CI Proof] generateNextMetadata seeds a missing optional refs object with a raw Poco::JSON::Object*, so getObject(f_refs)->has(f_main) throws 'Null pointer' - #109732
clickgapai wants to merge 2 commits into
Conversation
Extend test_insert_into_table_without_optional_metadata_arrays with cases that omit the optional `refs` object. generateNextMetadata seeds a missing `refs` with a raw Poco::JSON::Object*, so getObject returns null and ->has(f_main) throws a Null pointer exception on insert.
|
Pre-PR Validation Gate (per ClickGap pipeline): a) Deterministic repro? ❌ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [f510005] Summary: ❌
AI ReviewSummaryThis PR extends the existing Iceberg insert regression test to also remove Missing context / blind spots
Final Verdict
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 53 line(s), 2 function(s) across 10 file(s) · Details Top files
|
|
✅ |
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
Suspected bug:
generateNextMetadataseeds a missing optionalrefsobject with a rawPoco::JSON::Object*, sogetObject(f_refs)->has(f_main)throws 'Null pointer'Root cause: MetadataGenerator.cpp:212 uses
metadata_object->set(Iceberg::f_refs, new Poco::JSON::Object)(raw pointer) instead ofPoco::JSON::Object::Ptr(new Poco::JSON::Object); Poco's getObject requires theObject::Ptrtype tag and returns null for a rawObject*. The PR wrapped the three arrays it added (line 145) but left this pre-existing raw-pointer refs seed, leaving one member of the optional-metadata family broken.Affected locations:
src/Storages/ObjectStorage/DataLakes/Iceberg/MetadataGenerator.cpp:212— raw-pointer seeding of missing optionalrefsobjectsrc/Storages/ObjectStorage/DataLakes/Iceberg/MetadataGenerator.cpp:214— getObject(f_refs) returns null -> ->has(f_main) throws 'Null pointer'Why CI is needed: INSERT into an external Iceberg table that omits the optional
refsobject aborts with 'Null pointer' — the PR fixes 3 of 4 optional-metadata omission cases but leavesrefs(an object) broken with the identical type-tag trap it documents.Suggested fix: Change line 212 to
metadata_object->set(Iceberg::f_refs, Poco::JSON::Object::Ptr(new Poco::JSON::Object));(mirroring the array seeding at line 145 and createEmptyMetadataFile at Utils.cpp:998-1004), and add arefscase to the integration test'sfields_to_removeparametrize list.Assumptions
The bot recorded these claims it could not verify directly from source. A maintainer ✅ confirms; ❌ flags a wrong premise (the bot should rework or close the finding).
refsobject.refsis present.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — temporary CI proof PR, will be closed automatically.
Documentation entry for user-facing changes