Skip to content

Conversation

@stoewer
Copy link
Contributor

@stoewer stoewer commented Oct 8, 2025

What this PR does:
This addresses two issues with dedicated attribute columns with integer values introduced in vParquet5-preview2. The functions DedicatedColumns.Validate() and resourceSpanHash() were not taking taking the added integer columns into account.

Which issue(s) this PR fixes:
Fixes issues introduced by #5639

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]


func addHash(s *string, hash uint64) uint64 {
func addHashStr(s *string, hash uint64) uint64 {
if s == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this wasn't changed and it must be working, but it seems like a potential bug to me. If we skip nils, then do these layouts have the same hash?

(1) String01: foo, String02: nil
(2) String01: nil, String02: foo

In both cases it yields the same result: hash(foo)? One fix is to add a separator in between like AddUint64(prime number), and always add it even if nil.

Then they become distinct:
(1) foo, sep, sep
(2) sep, foo, sep

@stoewer stoewer merged commit f64ce21 into grafana:main Oct 13, 2025
22 checks passed
@stoewer stoewer deleted the vp5-int-column-issues branch October 13, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants