From 5659520efe9cbbdfde38b77739735b44d15e5593 Mon Sep 17 00:00:00 2001 From: Peter Toth Date: Sun, 10 Nov 2024 16:42:15 +0100 Subject: [PATCH] fix comments --- datafusion/sql/src/expr/mod.rs | 9 +++++---- datafusion/sql/src/expr/value.rs | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/datafusion/sql/src/expr/mod.rs b/datafusion/sql/src/expr/mod.rs index f3988f463268..72f88abcea99 100644 --- a/datafusion/sql/src/expr/mod.rs +++ b/datafusion/sql/src/expr/mod.rs @@ -176,10 +176,11 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { schema: &DFSchema, planner_context: &mut PlannerContext, ) -> Result { - // NOTE: This function is called recusively, so each match arm body should be as - // small as possible to avoid stack overflows in debug builds. Follow the - // common pattern of extracting into a separate function for non-trivial - // arms. See https://github.com/apache/datafusion/pull/12384 for more context. + // NOTE: This function is called recursively, so each match arm body should be as + // small as possible to decrease stack requirement. + // Follow the common pattern of extracting into a separate function for + // non-trivial arms. See https://github.com/apache/datafusion/pull/12384 for + // more context. match sql { SQLExpr::Value(value) => { self.parse_value(value, planner_context.prepare_param_data_types()) diff --git a/datafusion/sql/src/expr/value.rs b/datafusion/sql/src/expr/value.rs index 7dc15de7ad71..1cf090aa64aa 100644 --- a/datafusion/sql/src/expr/value.rs +++ b/datafusion/sql/src/expr/value.rs @@ -133,8 +133,6 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { ))) } - // IMPORTANT: Keep sql_array_literal's function body small to prevent stack overflow - // This function is recursively called, potentially leading to deep call stacks. pub(super) fn sql_array_literal( &self, elements: Vec,