From e06948a6cfe49b8ee614384ae236377f89b3e9bb Mon Sep 17 00:00:00 2001 From: Chloe Kim Date: Wed, 4 Oct 2023 19:12:12 +0800 Subject: [PATCH] fix: min, max with append only --- dozer-sql/src/aggregation/max_append_only.rs | 4 ++-- dozer-sql/src/aggregation/min_append_only.rs | 4 ++-- .../aggregation/tests/aggregation_max_append_only_tests.rs | 7 ++++--- .../aggregation/tests/aggregation_min_append_only_tests.rs | 7 ++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dozer-sql/src/aggregation/max_append_only.rs b/dozer-sql/src/aggregation/max_append_only.rs index d8660b87b7..0a3259bd7b 100644 --- a/dozer-sql/src/aggregation/max_append_only.rs +++ b/dozer-sql/src/aggregation/max_append_only.rs @@ -1,7 +1,7 @@ -use crate::aggregation::aggregator::{Aggregator}; +use crate::aggregation::aggregator::Aggregator; +use crate::calculate_err_field; use crate::errors::{PipelineError, UnsupportedSqlError}; -use crate::{calculate_err_field}; use dozer_sql_expression::aggregate::AggregateFunctionType::MaxAppendOnly; use dozer_types::chrono::{DateTime, FixedOffset, NaiveDate, Utc}; diff --git a/dozer-sql/src/aggregation/min_append_only.rs b/dozer-sql/src/aggregation/min_append_only.rs index d8b0f6618f..f7c2fe3ea5 100644 --- a/dozer-sql/src/aggregation/min_append_only.rs +++ b/dozer-sql/src/aggregation/min_append_only.rs @@ -1,7 +1,7 @@ -use crate::aggregation::aggregator::{Aggregator}; +use crate::aggregation::aggregator::Aggregator; +use crate::calculate_err_field; use crate::errors::{PipelineError, UnsupportedSqlError}; -use crate::{calculate_err_field}; use dozer_sql_expression::aggregate::AggregateFunctionType::MinAppendOnly; use dozer_types::chrono::{DateTime, FixedOffset, NaiveDate, Utc}; diff --git a/dozer-sql/src/aggregation/tests/aggregation_max_append_only_tests.rs b/dozer-sql/src/aggregation/tests/aggregation_max_append_only_tests.rs index 1b13a1e37a..d26fbf2004 100644 --- a/dozer-sql/src/aggregation/tests/aggregation_max_append_only_tests.rs +++ b/dozer-sql/src/aggregation/tests/aggregation_max_append_only_tests.rs @@ -1,7 +1,8 @@ use crate::aggregation::tests::aggregation_tests_utils::{ - get_date_field, get_decimal_field, get_duration_field, get_ts_field, - init_input_schema, init_processor, insert_exp, insert_field, update_exp, - DATE4, DATE8, FIELD_100_FLOAT, FIELD_100_INT, FIELD_100_UINT, FIELD_50_FLOAT, FIELD_50_INT, FIELD_50_UINT, FIELD_NULL, ITALY, SINGAPORE, + get_date_field, get_decimal_field, get_duration_field, get_ts_field, init_input_schema, + init_processor, insert_exp, insert_field, update_exp, DATE4, DATE8, FIELD_100_FLOAT, + FIELD_100_INT, FIELD_100_UINT, FIELD_50_FLOAT, FIELD_50_INT, FIELD_50_UINT, FIELD_NULL, ITALY, + SINGAPORE, }; use crate::output; use dozer_core::DEFAULT_PORT_HANDLE; diff --git a/dozer-sql/src/aggregation/tests/aggregation_min_append_only_tests.rs b/dozer-sql/src/aggregation/tests/aggregation_min_append_only_tests.rs index 95d76c2255..7b66d5cac2 100644 --- a/dozer-sql/src/aggregation/tests/aggregation_min_append_only_tests.rs +++ b/dozer-sql/src/aggregation/tests/aggregation_min_append_only_tests.rs @@ -1,7 +1,8 @@ use crate::aggregation::tests::aggregation_tests_utils::{ - get_date_field, get_decimal_field, get_duration_field, get_ts_field, - init_input_schema, init_processor, insert_exp, insert_field, update_exp, - DATE4, DATE8, FIELD_100_FLOAT, FIELD_100_INT, FIELD_100_UINT, FIELD_50_FLOAT, FIELD_50_INT, FIELD_50_UINT, FIELD_NULL, ITALY, SINGAPORE, + get_date_field, get_decimal_field, get_duration_field, get_ts_field, init_input_schema, + init_processor, insert_exp, insert_field, update_exp, DATE4, DATE8, FIELD_100_FLOAT, + FIELD_100_INT, FIELD_100_UINT, FIELD_50_FLOAT, FIELD_50_INT, FIELD_50_UINT, FIELD_NULL, ITALY, + SINGAPORE, }; use crate::output; use dozer_core::DEFAULT_PORT_HANDLE;