This is an automated email from the ASF dual-hosted git repository. alamb pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push: new fffcd1f76c Improve err message grammar (#16566) fffcd1f76c is described below commit fffcd1f76c63d7bed5fdfabfde48f515b6d7845b Author: Piotr Findeisen <piotr.findei...@gmail.com> AuthorDate: Fri Jun 27 17:10:43 2025 +0200 Improve err message grammar (#16566) --- datafusion/sql/src/expr/function.rs | 4 ++-- datafusion/sqllogictest/test_files/aggregate.slt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datafusion/sql/src/expr/function.rs b/datafusion/sql/src/expr/function.rs index 071e959400..15e6eb7fb9 100644 --- a/datafusion/sql/src/expr/function.rs +++ b/datafusion/sql/src/expr/function.rs @@ -223,8 +223,8 @@ impl<S: ContextProvider> SqlToRel<'_, S> { } = function_args; if over.is_some() && !within_group.is_empty() { - return plan_err!("OVER and WITHIN GROUP clause are can not be used together. \ - OVER is for window function, whereas WITHIN GROUP is for ordered set aggregate function"); + return plan_err!("OVER and WITHIN GROUP clause cannot be used together. \ + OVER is for window functions, whereas WITHIN GROUP is for ordered set aggregate functions"); } // If function is a window function (it has an OVER clause), diff --git a/datafusion/sqllogictest/test_files/aggregate.slt b/datafusion/sqllogictest/test_files/aggregate.slt index f9dc872a3c..40f73a19cd 100644 --- a/datafusion/sqllogictest/test_files/aggregate.slt +++ b/datafusion/sqllogictest/test_files/aggregate.slt @@ -170,7 +170,7 @@ statement error DataFusion error: This feature is not implemented: Only a single SELECT approx_percentile_cont(0.95) WITHIN GROUP (ORDER BY c5, c12) FROM aggregate_test_100 # Not supported over sliding windows -query error DataFusion error: Error during planning: OVER and WITHIN GROUP clause are can not be used together. OVER is for window function, whereas WITHIN GROUP is for ordered set aggregate function +query error DataFusion error: Error during planning: OVER and WITHIN GROUP clause cannot be used together. OVER is for window functions, whereas WITHIN GROUP is for ordered set aggregate functions SELECT approx_percentile_cont(0.5) WITHIN GROUP (ORDER BY c3) OVER (ROWS BETWEEN 4 PRECEDING AND CURRENT ROW) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org For additional commands, e-mail: commits-h...@datafusion.apache.org