Skip to content

Commit b3aba27

Browse files
chore(parquet): Bump parquet-common dependency (#12023)
Brings the last commit from parquet-common [0811a700a852759c16799358b4424d9888afec3f](prometheus-community/parquet-common@0811a70) See link for the diff between the two commits prometheus-community/parquet-common@76512c6...0811a70 --------- Co-authored-by: francoposa <franco@francoposa.io>
1 parent c847930 commit b3aba27

File tree

11 files changed

+191
-126
lines changed

11 files changed

+191
-126
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require (
3030
github.com/opentracing-contrib/go-stdlib v1.1.0 // indirect
3131
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
3232
github.com/pkg/errors v0.9.1
33-
github.com/prometheus-community/parquet-common v0.0.0-20250619184244-76512c603fb1
33+
github.com/prometheus-community/parquet-common v0.0.0-20250708150752-0811a700a852
3434
github.com/prometheus/alertmanager v0.28.1
3535
github.com/prometheus/client_golang v1.22.0
3636
github.com/prometheus/client_model v0.6.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,8 +905,8 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg
905905
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
906906
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
907907
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
908-
github.com/prometheus-community/parquet-common v0.0.0-20250619184244-76512c603fb1 h1:g3LbKmvpUvgRJUGER4w0MqKZb/vle0F1yQ7McHnh1og=
909-
github.com/prometheus-community/parquet-common v0.0.0-20250619184244-76512c603fb1/go.mod h1:MwYpD+FKot7LWBMFaPS6FeM8oqo77u5erRlNkSSFPA0=
908+
github.com/prometheus-community/parquet-common v0.0.0-20250708150752-0811a700a852 h1:GNUP6g2eSqZbzGTdFK9D1RLQLjZxCkuuA/MkgfB/enQ=
909+
github.com/prometheus-community/parquet-common v0.0.0-20250708150752-0811a700a852/go.mod h1:zJNGzMKctJoOESjRVaNTlPis3C9VcY3cRzNxj6ll3Is=
910910
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
911911
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
912912
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=

pkg/storage/parquet/block/lazy_reader.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ type LazyReaderLocalLabelsBucketChunks struct {
111111
earlyValidation bool
112112

113113
// bkt to download the labels file to local disk and open the chunks file from the bucket
114-
bkt objstore.InstrumentedBucketReader
115-
localDir string
116-
shardOpts []storage.ShardOption
114+
bkt objstore.InstrumentedBucketReader
115+
localDir string
116+
fileOpts []storage.FileOption
117117

118118
metrics *LazyParquetReaderMetrics
119119
onClosed func(*LazyReaderLocalLabelsBucketChunks)
@@ -137,7 +137,7 @@ func NewLazyReaderLocalLabelsBucketChunks(
137137
blockID ulid.ULID,
138138
bkt objstore.InstrumentedBucketReader,
139139
localDir string,
140-
//shardOpts []storage.ShardOption,
140+
//fileOpts []storage.FileOption,
141141
metrics *LazyParquetReaderMetrics,
142142
onClosed func(*LazyReaderLocalLabelsBucketChunks),
143143
lazyLoadingGate gate.Gate,
@@ -151,6 +151,11 @@ func NewLazyReaderLocalLabelsBucketChunks(
151151
earlyValidation: earlyValidation,
152152
bkt: bkt,
153153
localDir: localDir,
154+
fileOpts: []storage.FileOption{
155+
storage.WithFileOptions(
156+
parquet.SkipBloomFilters(false),
157+
),
158+
},
154159

155160
metrics: metrics,
156161
usedAt: atomic.NewInt64(0),
@@ -222,7 +227,7 @@ func (r *LazyReaderLocalLabelsBucketChunks) convertLabelsFileToLocalDisk() error
222227
labelsFileName := r.labelsFileName()
223228
bucketFileOpener := storage.NewParquetBucketOpener(r.bkt)
224229

225-
bucketLabelsFile, err := bucketFileOpener.Open(r.ctx, labelsFileName, r.shardOpts...)
230+
bucketLabelsFile, err := bucketFileOpener.Open(r.ctx, labelsFileName, r.fileOpts...)
226231
if err != nil {
227232
return errors.Wrap(err, "open bucket parquet labels file")
228233
}
@@ -359,7 +364,7 @@ func (r *LazyReaderLocalLabelsBucketChunks) loadReader() (Reader, error) {
359364
r.shardIdx,
360365
labelsLocalFileOpener,
361366
chunksBucketOpener,
362-
r.shardOpts...,
367+
r.fileOpts...,
363368
)
364369

365370
if err != nil {

pkg/storage/parquet/block/reader.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func NewParquetBucketOpener(bkt objstore.BucketReader, prefix string) *ParquetBu
4848
}
4949

5050
func (o *ParquetBucketOpener) Open(
51-
ctx context.Context, name string, opts ...storage.ShardOption,
51+
ctx context.Context, name string, opts ...storage.FileOption,
5252
) (*storage.ParquetFile, error) {
5353
return storage.OpenFromBucket(ctx, o.bkt, filepath.Join(o.prefix, name), opts...)
5454
}
@@ -64,7 +64,7 @@ func NewParquetLocalFileOpener(dir string) *ParquetLocalFileOpener {
6464
}
6565

6666
func (o *ParquetLocalFileOpener) Open(
67-
ctx context.Context, name string, opts ...storage.ShardOption,
67+
ctx context.Context, name string, opts ...storage.FileOption,
6868
) (*storage.ParquetFile, error) {
6969
return storage.OpenFromFile(ctx, filepath.Join(o.dir, name), opts...)
7070
}
@@ -84,7 +84,7 @@ func NewBasicReader(
8484
shard int,
8585
labelsFileOpener storage.ParquetOpener,
8686
chunksFileOpener storage.ParquetOpener,
87-
opts ...storage.ShardOption,
87+
opts ...storage.FileOption,
8888
) (*BasicReader, error) {
8989
labelsFileName := schema.LabelsPfileNameForShard(blockID, shard)
9090
chunksFileName := schema.ChunksPfileNameForShard(blockID, shard)

pkg/storage/parquet/queryable_shard.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func newQueryableShard(opts *querierOpts, block storage.ParquetShard, d *schema.
2828
if err != nil {
2929
return nil, err
3030
}
31-
m, err := search.NewMaterializer(s, d, block, opts.concurrency, opts.pagePartitioningMaxGapSize)
31+
m, err := search.NewMaterializer(s, d, block, opts.concurrency)
3232
if err != nil {
3333
return nil, err
3434
}
@@ -47,7 +47,7 @@ func (b queryableShard) Query(ctx context.Context, sorted bool, mint, maxt int64
4747
results := make([]prom_storage.ChunkSeries, 0, 1024)
4848
rMtx := sync.Mutex{}
4949

50-
for i, group := range b.shard.LabelsFile().RowGroups() {
50+
for rgi := range b.shard.LabelsFile().RowGroups() {
5151
errGroup.Go(func() error {
5252
cs, err := search.MatchersToConstraint(matchers...)
5353
if err != nil {
@@ -57,7 +57,7 @@ func (b queryableShard) Query(ctx context.Context, sorted bool, mint, maxt int64
5757
if err != nil {
5858
return err
5959
}
60-
rr, err := search.Filter(ctx, group, cs...)
60+
rr, err := search.Filter(ctx, b.shard, rgi, cs...)
6161
if err != nil {
6262
return err
6363
}
@@ -66,7 +66,7 @@ func (b queryableShard) Query(ctx context.Context, sorted bool, mint, maxt int64
6666
return nil
6767
}
6868

69-
series, err := b.m.Materialize(ctx, i, mint, maxt, skipChunks, rr)
69+
series, err := b.m.Materialize(ctx, rgi, mint, maxt, skipChunks, rr)
7070
if err != nil {
7171
return err
7272
}
@@ -97,7 +97,7 @@ func (b queryableShard) LabelNames(ctx context.Context, limit int64, matchers []
9797

9898
results := make([][]string, len(b.shard.LabelsFile().RowGroups()))
9999

100-
for i, group := range b.shard.LabelsFile().RowGroups() {
100+
for rgi := range b.shard.LabelsFile().RowGroups() {
101101
errGroup.Go(func() error {
102102
cs, err := search.MatchersToConstraint(matchers...)
103103
if err != nil {
@@ -107,15 +107,15 @@ func (b queryableShard) LabelNames(ctx context.Context, limit int64, matchers []
107107
if err != nil {
108108
return err
109109
}
110-
rr, err := search.Filter(ctx, group, cs...)
110+
rr, err := search.Filter(ctx, b.shard, rgi, cs...)
111111
if err != nil {
112112
return err
113113
}
114-
series, err := b.m.MaterializeLabelNames(ctx, i, rr)
114+
series, err := b.m.MaterializeLabelNames(ctx, rgi, rr)
115115
if err != nil {
116116
return err
117117
}
118-
results[i] = series
118+
results[rgi] = series
119119
return nil
120120
})
121121
}
@@ -137,7 +137,7 @@ func (b queryableShard) LabelValues(ctx context.Context, name string, limit int6
137137

138138
results := make([][]string, len(b.shard.LabelsFile().RowGroups()))
139139

140-
for i, group := range b.shard.LabelsFile().RowGroups() {
140+
for rgi := range b.shard.LabelsFile().RowGroups() {
141141
errGroup.Go(func() error {
142142
cs, err := search.MatchersToConstraint(matchers...)
143143
if err != nil {
@@ -147,15 +147,15 @@ func (b queryableShard) LabelValues(ctx context.Context, name string, limit int6
147147
if err != nil {
148148
return err
149149
}
150-
rr, err := search.Filter(ctx, group, cs...)
150+
rr, err := search.Filter(ctx, b.shard, rgi, cs...)
151151
if err != nil {
152152
return err
153153
}
154-
series, err := b.m.MaterializeLabelValues(ctx, name, i, rr)
154+
series, err := b.m.MaterializeLabelValues(ctx, name, rgi, rr)
155155
if err != nil {
156156
return err
157157
}
158-
results[i] = series
158+
results[rgi] = series
159159
return nil
160160
})
161161
}

vendor/github.com/prometheus-community/parquet-common/queryable/parquet_queryable.go

Lines changed: 14 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)