Skip to content

Commit

Permalink
Add range condition to bytes predicates (#4198)
Browse files Browse the repository at this point in the history
* parquetquery - change range condition for  bytes to actually compare the value

* changelog
  • Loading branch information
ie-pham authored Oct 16, 2024
1 parent 408c5de commit 891e6bb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
To continue using the Jaeger exporter, use the following environment variable: `OTEL_TRACES_EXPORTER=jaeger`.
* [CHANGE] No longer send the final diff in GRPC streaming. Instead we rely on the streamed intermediate results. [#4062](https://github.com/grafana/tempo/pull/4062) (@joe-elliott)
* [CHANGE] Update Go to 1.23.1 [#4146](https://github.com/grafana/tempo/pull/4146) [#4147](https://github.com/grafana/tempo/pull/4147) (@javiermolinar)
* [CHANGE] TraceQL: Add range condition for byte predicates [#4198](https://github.com/grafana/tempo/pull/4198) (@ie-pham)
* [FEATURE] Discarded span logging `log_discarded_spans` [#3957](https://github.com/grafana/tempo/issues/3957) (@dastrobu)
* [FEATURE] TraceQL support for instrumentation scope [#3967](https://github.com/grafana/tempo/pull/3967) (@ie-pham)
* [ENHANCEMENT] TraceQL: Attribute iterators collect matched array values [#3867](https://github.com/grafana/tempo/pull/3867) (@electron0zero, @stoewer)
Expand Down
19 changes: 19 additions & 0 deletions pkg/parquetquery/predicates.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/parquetquerygen/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (p {{ $structName }}) KeepValue(v pq.Value) bool {
{
Op: "Equal",
CompareCond: `bytes.Equal(bytes.TrimLeft(vv, "\x00"), p.value)`,
RangeCond: "", // benchmarks are generally better w/o a range condition? "bytes.Compare(p.value, min) >= 0 && bytes.Compare(p.value, max) <= 0",
RangeCond: "bytes.Compare(p.value, min) >= 0 && bytes.Compare(p.value, max) <= 0",
},
{
Op: "NotEqual",
Expand Down

0 comments on commit 891e6bb

Please sign in to comment.