mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-20 17:57:30 +01:00
Optimize sort order in nodestate parquet files
This commit is contained in:
@@ -84,6 +84,12 @@ func writeNodeStateParquetBytes(rows []ParquetNodeStateRow) ([]byte, error) {
|
||||
|
||||
writer := pq.NewGenericWriter[ParquetNodeStateRow](&buf,
|
||||
pq.Compression(&pq.Zstd),
|
||||
pq.SortingWriterConfig(pq.SortingColumns(
|
||||
pq.Ascending("cluster"),
|
||||
pq.Ascending("subcluster"),
|
||||
pq.Ascending("hostname"),
|
||||
pq.Ascending("time_stamp"),
|
||||
)),
|
||||
)
|
||||
|
||||
if _, err := writer.Write(rows); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user