Repository navigation
fix: add rid.setLegacy(true) in collection branches to prevent NullPointerException (#5505) - #5506
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Up to standards ✅🟢 Issues
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5506 +/- ##
==========================================
+ Coverage 67.45% 67.48% +0.02%
==========================================
Files 1724 1724
Lines 142993 142995 +2
Branches 30643 30643
==========================================
+ Hits 96463 96504 +41
+ Misses 33852 33812 -40
- Partials 12678 12679 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Confirmed this independently on current Tests-only commit: justinblethrow-cloud@59b631f It can be applied with: git cherry-pick 59b631f82fc38bd9116408d71eb53f2dee1c87a4The tests cover:
Focused verification: 2 tests run, 0 failures, 0 errors. This should also exercise the two lines that Codecov currently reports as uncovered. |
…nd TRAVERSE targets Both planners' collection branches built the per-element Rid AST node without flagging it legacy, so Rid.toRecordId dereferenced a null expression. A bare bound RID always worked, so each test binds a collection; the single-element list is covered separately because it fails on the same path.
59fe889 to
664dfce
Compare
Fixes #5505
Problem: Passing a collection of RIDs as a query parameter to SELECT or TRAVERSE throws NullPointerException:
Root cause: The collection branches in both and create objects without calling . The singleton RID branches beside them do call it. Without this flag, tries to dereference a null field instead of reading / directly.
Fix: Added in the collection branch of both planners:
Testing: Single-element bound RID collections and multi-element collections now work correctly for both SELECT and TRAVERSE.