GeezerVison is showing github.com — fix(#12229): keep a property declared with conflicting column types out of a view's columns by shaunpatterson · Pull Request #12231 · ArcadeData/arcadedb
Conversation
Fixes #12229.
Problem
A Graph Analytical View keeps a property out of its columns when its types declare it with different column types, but the exclusion did not hold:
- The collector removed the name on the conflict and the next type declaring it added it again:
A.p INTEGER, B.p DOUBLE, C.p INTEGER gave an INT column for p (the same for edge properties: R.w INTEGER, S.w DOUBLE, T.w INTEGER gave an INT edge column for w).
- When the conflict left no declared vertex property, the build fell back to sampling records for schemaless properties, and the first sampled value created a column for the conflicting name:
A.p INTEGER, B.p DOUBLE gave an INT column.
In both vertex cases the view served p for the INTEGER types from the column and held nothing for the DOUBLE vertices (their values do not round-trip through INT, so fillProperties skips them).
Change
CSRBuilder:
- One collector,
declaredColumnTypes(typeNames, included, conflicting, ...), replaces collectSchemaProperties and collectEdgeSchemaProperties, which were the same loop with a different filter and log text. It records every name that conflicted in conflicting and skips that name for every later type.
- The vertex path keeps that set for the build, and
sampleProperties skips the names in it.
Tests
New GavPropertyTypeConflictTest:
| test |
engine/src/main from origin/main |
this branch |
aVertexPropertyConflictStaysAcrossALaterType (A INTEGER, B DOUBLE, C INTEGER) |
fails: {#7:0=4, #4:0=null, #4:1=null, #1:0=1} served from the view |
passes, no vertex served p from a column |
aVertexPropertyConflictIsNotSampledBack (A INTEGER, B DOUBLE) |
fails: {#4:0=null, #4:1=null, #1:0=1} |
passes |
anEdgePropertyConflictStaysAcrossALaterType (R INTEGER, S DOUBLE, T INTEGER) |
fails: the view has an edge column |
passes |
com/arcadedb/graph/olap/**/*Test and WeightedPathTest (excluding slow): 743 tests, all pass.
Overlap with #12194
#12194 (open) changes collectEdgeSchemaProperties the same way for the edge case (commit eab5491, from a review comment). Whichever of the two merges second needs that method resolved to the shared declaredColumnTypes of this PR.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…mn types out of a view's columns
coderabbitai
Bot
commented
Nov 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 53 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used all 4 included reviews currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d50ef77f-a4ff-4ea0-812e-df58be4d1fdf
Commits
-
Reviewing files that changed from the base of the PR and between 42473e4 and 30c5afe.
Files selected for processing: 2
-
engine/src/main/java/com/arcadedb/graph/olap/CSRBuilder.java
engine/src/test/java/com/arcadedb/graph/olap/GavPropertyTypeConflictTest.java
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mergify
Bot
commented
Nov 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
This pull request is merged.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Up to standards ✅
🟢 Issues 0 issues
Results:
0 new issues
View in Codacy
🟢 Metrics -5 complexity
| Metric |
Results |
| Complexity |
-5 |
View in Codacy
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Triage: triage:lgtm · severity:minor · areas: engine · has-issue
Summary: This PR keeps a property declared with conflicting column types out of a Graph Analytical View's columns. It fixes two cases in CSRBuilder.
- A later type that re-declared the first type no longer brings the name back. For example,
A.p INTEGER, B.p DOUBLE, C.p INTEGER used to give an INT column for p.
- Record sampling no longer re-adds a conflicting name.
What I checked:
declaredColumnTypes merges the two near-identical collectors. Once a name conflicts it is added to conflicting and skipped for every later type.
- The vertex path passes the set on to
sampleProperties, which skips those names. I found no remaining path that re-adds them.
- The edge path uses a fresh local set, which is enough because edge properties are never sampled.
- The change stays inside
CSRBuilder and adds no new dependency or public API, so it adds no security hazard.
- The new
GavPropertyTypeConflictTest covers the three scenarios in the description. It uses the preferred AssertJ style and has no wall-clock assertions.
- It also follows CLAUDE.md on imports,
final parameters and single-statement if without braces.
Non-blocking notes:
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…t a conflicting name leaves the other declared properties their column
Each test now drops the view it builds, as the other view tests do. A new test declares a second property q on one type and checks that the view still serves q while p, declared with conflicting column types, has no column, so the exclusion cannot be turned into dropping every property.
|
Triage: triage:lgtm · severity:minor · areas: engine · has-issue
LGTM. The change is focused and matches the linked issue (#12229, severity:minor).
CSRBuilder: declaredColumnTypes replaces the two duplicated collectors. It records a conflicting name in conflicting and skips it for every later type, so A INTEGER, B DOUBLE, C INTEGER no longer brings the name back. sampleProperties now skips the conflicting names, which closes the schemaless-sampling fallback.
- Behavior of the edge path is preserved. A fresh
conflicting set is passed, so the exclusion holds across later edge types as well.
- No security concerns. There is no new dependency, no new input handling and no performance regression, since the schema loop runs once per build.
- Tests: the new
GavPropertyTypeConflictTest covers the three reported scenarios plus a check that a non-conflicting property (q) keeps its column. It follows the assertThat style and uses TestHelper, with no wall-clock assertions or fixed ports.
Optional nit: the vertex and edge paths only differ by the log text (what and kind parameters). That is fine, but you could derive the message from a single parameter.
Note the overlap with #12194, which the PR description already flags.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Triage: triage:lgtm · severity:minor · areas: engine · has-issue
LGTM. The fix is small and the tests cover it.
- Fix:
CSRBuilder now has one collector, declaredColumnTypes, in place of the two near-identical loops. Once a name conflicts, it is recorded in conflicting and skipped for every later type. This stops a third type that repeats the first type from bringing the name back.
- Sampling: For vertices,
sampleProperties also skips conflicting names, so the schemaless fallback no longer creates a column for them. For edges, a fresh set is passed, which matches the old behavior.
- Tests:
GavPropertyTypeConflictTest covers the later-type case, the sampling fallback, the edge case named in the PR description, and a check that an unrelated property (q) keeps its column. Per the PR description, the first three fail on main and pass on this branch.
- Conventions: The code uses
final, imports Predicate, and has no new dependencies, no System.out and no wall-clock assertions.
Minor nits, which don't block the merge:
- The
what and kind string parameters exist only to build the log message. They are fine as is.
- The PR overlaps with fix(#12177): refuse a Graph Analytical View edge property the schema does not declare #12194, as the author notes, so whichever merges second needs a rebase.
anEdgePropertyConflictStaysAcrossALaterType is mentioned in the PR description but not in the visible diff. Check that it is in the test file, because the diff shows only three vertex tests.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Labels
engine
Core engine: document/schema API
has-issue
The PR links an issue it resolves
pr_approved
review-pr: CI LGTM + clean triage + green sandbox tests on the reviewed head
severity:minor
Cosmetic, documentation, edge case, or a workaround exists
triage:lgtm
PR triage: nothing blocking, ready for a maintainer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|