JDBC: Add dedicated regression coverage for hasOverlappingSiblings behavior
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 522
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 137
Description
### Summary
`JdbcBasePersistenceImpl.hasOverlappingSiblings()` is JDBC-specific (schema v2+ overlap query + location comparison). NoSQL already has dedicated behavioral coverage in `TestNoSqlMetaStoreManager.overlappingLocations()`, but JDBC did not have equivalent tests on `main`.
The production bug is tracked in #3378 and addressed in #4580 (fix + initial JDBC regression tests).
This issue tracks **remaining** JDBC regression coverage beyond #4580, not the core fix itself.
### Already addressed by #4580
- Use `PolarisEntityUtils.asLocationBasedEntity(PolarisEntity.of(result))` instead of casting query rows to `LocationBasedEntity`
- Initial JDBC tests in `AtomicMetastoreManagerWithJdbcBasePersistenceImplTest` (overlap + non-overlap scenarios)
- Schema-version execution via `AtomicMetastoreManagerWithJdbcBasePersistenceImplSchemaTest`
### Remaining coverage (follow-up)
Port additional scenarios from `TestNoSqlMetaStoreManager.overlappingLocations()` to JDBC/H2, for example:
- duplicate base locations (same path, trailing-slash variants)
- parent/child path overlap in both directions
- scheme normalization where applicable (`s3` vs `s3a`, etc.)
- behavior after dropping one overlapping entity
Note: `QueryGeneratorTest.testGenerateOverlapQuery` covers overlap **SQL generation** only, not full persistence behavior.
### Related
- #3378 — original bug report
- #4580 — fix + initial regression tests
Contributor guide
Research direction
Start with AtomicMetastoreManagerWithJdbcBasePersistenceImplTest and AtomicMetastoreManagerWithJdbcBasePersistenceImplSchemaTest, then use TestNoSqlMetaStoreManager.overlappingLocations() as the behavioral reference. Add JDBC/H2 coverage for duplicate and parent/child locations, applicable scheme normalization, and behavior after dropping an overlapping entity. Run the focused JDBC tests; QueryGeneratorTest.testGenerateOverlapQuery covers SQL generation only.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100