-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[exporter/clickhouseexporter] Sort attribute maps before insertion #33634 #35725
base: main
Are you sure you want to change the base?
[exporter/clickhouseexporter] Sort attribute maps before insertion #33634 #35725
Conversation
|
0576d04
to
5bf53bd
Compare
Please add a changelog entry |
5bf53bd
to
b093216
Compare
@dmitryax there you are! |
b093216
to
4e716f6
Compare
Added license header |
142c36d
to
1055b0b
Compare
[x] |
1055b0b
to
636bdaf
Compare
The updated patch drops my implementation of I am planning to make changes to clickhouse-go such as any usual |
636bdaf
to
361f6b5
Compare
Ok, nevermind, updated to clickhouse-go v2.30.0, ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the contribution, glad to see this implemented. The compression benefits will be great!
Hi, folks. Is there anything else expected from me in regards to this PR, or we're waiting for reviewers' timeslot? |
@dmitryax could you help run ci? thank you. |
bump? @dmitryax |
@open-telemetry/collector-contrib-approvers hi,anyone could help run ci? thank you. |
2e17baf
to
a15186c
Compare
Rebased to latest 'main'. |
@hanjm I will probably drop this PR after a while, sorry. |
@Frapschen @dmitryax mind taking a look? |
@earwin I appreciate your patience, the CI can be a bit difficult with all of the linting scripts. It looks like the CI is passing now though @crobert-1 I don't have permission to merge, let me know if you can get in touch with the right approvers for this. It's an important change that has been open for a while. Thanks! |
Description
Our attributes are stored as Map(String, String) in CH.
By default the order of keys is undefined and as described in #33634 leads to worse compression and duplicates in
group by
(unless carefully accounted for).This PR uses the
column.IterableOrderedMap
facility from clickhouse-go to ensure fixed attribute key order.It is a reimplementation of #34598 that uses less allocations and is (arguably) somewhat more straightforward.
I'm opening this as a draft, because this PR (and #34598) are blocked by ClickHouse/clickhouse-go#1365 (fixed in ClickHouse/clickhouse-go#1418)
In addition, I'm trying to add the implementation of
column.IterableOrderedMap
used to clickhouse-go upstream: ClickHouse/clickhouse-go#1417If it is accepted, I will amend this PR accordingly.
Link to tracking issue
Fixes #33634
Testing
The IOM implementation was used in production independently.
I'm planning to build otelcollector with this PR and cut over my production to it in the next few of days.