Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async fn main() -> anyhow::Result<()> {
{
if std::env::var(DEBUG_PYROSCOPE_URL).is_ok() {
let url = std::env::var(DEBUG_PYROSCOPE_URL).ok();
Some(start_profiling(url.unwrap()));
start_profiling(url.unwrap());
}
}

Expand Down
8 changes: 6 additions & 2 deletions server/src/storage/object_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ 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::Compression};
use datafusion::{
arrow::{
array::TimestampMillisecondArray, ipc::reader::StreamReader, record_batch::RecordBatch,
Expand Down Expand Up @@ -321,7 +321,11 @@ pub trait ObjectStorage: Sync + 'static {
fs::File::create(&parquet_path).map_err(|_| MoveDataError::Create)?;
parquet_table.upsert(&parquet_path);

let props = WriterProperties::builder().build();
let props = WriterProperties::builder()
.set_compression(Compression::SNAPPY)
.set_max_row_group_size(1024 * 256)
.build();

let schema = Arc::new(record_reader.merged_schema());
let mut writer = ArrowWriter::try_new(parquet_file, schema.clone(), Some(props))?;

Expand Down