Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion server/src/storage/object_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ use crate::{
use actix_web_prometheus::PrometheusMetrics;
use async_trait::async_trait;
use bytes::Bytes;
use datafusion::arrow::datatypes::Schema;
use datafusion::{
arrow::datatypes::Schema,
parquet::{basic::Encoding, schema::types::ColumnPath},
};
use datafusion::{
arrow::{
array::TimestampMillisecondArray, ipc::reader::StreamReader, record_batch::RecordBatch,
Expand Down Expand Up @@ -324,6 +327,10 @@ pub trait ObjectStorage: Sync + 'static {
let props = WriterProperties::builder()
.set_max_row_group_size(CONFIG.parseable.row_group_size)
.set_compression(CONFIG.parseable.parquet_compression.into())
.set_column_encoding(
ColumnPath::new(vec!["p_timestamp".to_string()]),
Encoding::DELTA_BINARY_PACKED,
)
.build();
let schema = Arc::new(record_reader.merged_schema());
let mut writer = ArrowWriter::try_new(parquet_file, schema.clone(), Some(props))?;
Expand Down