[Bugfix] PostgreSQL case sensitivity bug in UNNEST alias for flat collections#242
Merged
suresh-prakash merged 1 commit intohypertrace:mainfrom Oct 16, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #242 +/- ##
============================================
+ Coverage 79.87% 79.88% +0.01%
- Complexity 1099 1100 +1
============================================
Files 213 213
Lines 5396 5400 +4
Branches 473 473
============================================
+ Hits 4310 4314 +4
Misses 760 760
Partials 326 326
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
suresh-prakash
approved these changes
Oct 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
When using UNNEST on flat collections with mixed-case field names (e.g.,
categoryTags), PostgreSQL threw an error:column "attributes_dot_authTypes_unnested" does not exist Hint: Perhaps you meant to reference the column "attributes_dot_authtypes_unnested".Root Cause
The UNNEST alias was created without quotes, causing PostgreSQL to lowercase it (
categorytags_unnested), but references used quotes preserving the original case ("categoryTags_unnested"), resulting in a mismatch.Solution
Both aliases are now generated as:
p1("categoryTags_unnested")instead ofp1(categoryTags_unnested), eliminating the mismatchTesting
testFlatPostgresCollectionUnnestMixedCaseFieldwithcategoryTagsfield.