diff --git a/src/query/src/optimizer.rs b/src/query/src/optimizer.rs index d31b01d98442..e6a971417c23 100644 --- a/src/query/src/optimizer.rs +++ b/src/query/src/optimizer.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub mod magic; +pub mod count_wildcard; pub mod order_hint; pub mod remove_duplicate; pub mod string_normalization; diff --git a/src/query/src/optimizer/magic.rs b/src/query/src/optimizer/count_wildcard.rs similarity index 97% rename from src/query/src/optimizer/magic.rs rename to src/query/src/optimizer/count_wildcard.rs index ac0662151b2b..359d333c25c1 100644 --- a/src/query/src/optimizer/magic.rs +++ b/src/query/src/optimizer/count_wildcard.rs @@ -60,13 +60,13 @@ impl CountWildcardToTimeIndexRule { Expr::WindowFunction(mut window_function) if Self::is_count_star_window_aggregate(&window_function) => { - window_function.args = new_arg.clone(); + window_function.args.clone_from(&new_arg); Ok(Transformed::yes(Expr::WindowFunction(window_function))) } Expr::AggregateFunction(mut aggregate_function) if Self::is_count_star_aggregate(&aggregate_function) => { - aggregate_function.args = new_arg.clone(); + aggregate_function.args.clone_from(&new_arg); Ok(Transformed::yes(Expr::AggregateFunction( aggregate_function, ))) diff --git a/src/query/src/query_engine/state.rs b/src/query/src/query_engine/state.rs index 5c7decde9060..3fa44a280617 100644 --- a/src/query/src/query_engine/state.rs +++ b/src/query/src/query_engine/state.rs @@ -43,7 +43,7 @@ use table::table::adapter::DfTableProviderAdapter; use table::TableRef; use crate::dist_plan::{DistExtensionPlanner, DistPlannerAnalyzer}; -use crate::optimizer::magic::CountWildcardToTimeIndexRule; +use crate::optimizer::count_wildcard::CountWildcardToTimeIndexRule; use crate::optimizer::order_hint::OrderHintRule; use crate::optimizer::remove_duplicate::RemoveDuplicate; use crate::optimizer::string_normalization::StringNormalizationRule;