vParquet5: dedicated columns support array values - #5760
Conversation
|
Performance impact: Benchmark shows slight increases in sec/op. However, those increases are not stable over multiple benchmark runs and therefore potentially artifacts vp5-p3 vs vp5-p4 |
There was a problem hiding this comment.
I think we need the separator between every array value as well. Since AddString is going character by character it doesn't distinguish between different runs of the same inputs. The other data types look ok.
func TestHash(t *testing.T) {
var h uint64
h = fnv1a.AddString64(h, "abc")
h = fnv1a.AddString64(h, "def")
fmt.Println(h)
var h2 uint64
h2 = fnv1a.AddString64(h2, "abcdef")
fmt.Println(h2)
}
Output:
16797655311123142743
16797655311123142743
--- PASS: TestHashThere was a problem hiding this comment.
Good catch, fixed it
There was a problem hiding this comment.
I see the separator was added to addHashStr() but not where it's called. I was thinking we need to add the separator within this loop of attr.Value string slice. But now even better would be to pass it with addHashStr(hash, attr.Value...)
There was a problem hiding this comment.
I added some tests and even found a couple of more cases that could lead to collisions. I think it should be OK now
c495ff3 to
eb2f70e
Compare
* Tune benchmarks * Add options field to dedicated attribute columns * Dedicated columns have slice values * New encoding vParquet5-preview4 * Reuse slices in DedicatedAttributes * Run make generate-manifest * Fix lint/fmt warning * CHANGELOG.md * Process options in DedicatedColumns.Hash() * vp3 and vp4 ignore dedicated columns with options * Refactor filterDedicatedColumns() functions * Avoid collistions when hashing dedicated attribute slices * Fix hashing for rebatchTrace() and add tests
What this PR does:
Add support for arrays to dedicated columns for integers and strings on resource and span level
An array is enabled for each individual dedicated column via tempo config or overrides:
Columns with options are ignored in vp3 and vp4
Which issue(s) this PR fixes:
Contributes to #5736
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]