Skip to content

chore(cubestore): Use fourth input parameter for Sum::new #8994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 3 additions & 2 deletions rust/cubestore/cubestore/src/metastore/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use crate::rocks_table_impl;
use crate::{base_rocks_secondary_index, CubeError};
use byteorder::{BigEndian, WriteBytesExt};
use chrono::DateTime;

Check warning on line 11 in rust/cubestore/cubestore/src/metastore/table.rs

View workflow job for this annotation

GitHub Actions / Debian Rust nightly-2024-01-29

Diff in /home/runner/work/cube/cube/rust/cubestore/cubestore/src/metastore/table.rs

Check warning on line 11 in rust/cubestore/cubestore/src/metastore/table.rs

View workflow job for this annotation

GitHub Actions / Debian Rust nightly-2024-01-29

Diff in /home/runner/work/cube/cube/rust/cubestore/cubestore/src/metastore/table.rs
use chrono::Utc;
use datafusion::arrow::datatypes::Schema as ArrowSchema;
use datafusion::physical_plan::expressions::{Column as FusionColumn, Max, Min, Sum};
use datafusion::physical_plan::expressions::{sum_return_type, Column as FusionColumn, Max, Min, Sum};
use datafusion::physical_plan::{udaf, AggregateExpr, PhysicalExpr};
use itertools::Itertools;

Expand Down Expand Up @@ -74,9 +74,10 @@
self.column.get_name().as_str(),
&schema,
)?);
let res: Arc<dyn AggregateExpr> = match self.function {

Check warning on line 77 in rust/cubestore/cubestore/src/metastore/table.rs

View workflow job for this annotation

GitHub Actions / Debian Rust nightly-2024-01-29

Diff in /home/runner/work/cube/cube/rust/cubestore/cubestore/src/metastore/table.rs

Check warning on line 77 in rust/cubestore/cubestore/src/metastore/table.rs

View workflow job for this annotation

GitHub Actions / Debian Rust nightly-2024-01-29

Diff in /home/runner/work/cube/cube/rust/cubestore/cubestore/src/metastore/table.rs
AggregateFunction::SUM => {
Arc::new(Sum::new(col.clone(), col.name(), col.data_type(schema)?))
let input_data_type = col.data_type(schema)?;
Arc::new(Sum::new(col.clone(), col.name(), sum_return_type(&input_data_type)?, &input_data_type))
}
AggregateFunction::MAX => {
Arc::new(Max::new(col.clone(), col.name(), col.data_type(schema)?))
Expand Down
Loading