Apache DataFusion SQL Query Engine
Improve err message grammar (#16566)
Piotr Findeisenfffcd1f76c63
diff --git a/datafusion/sql/src/expr/function.rs b/datafusion/sql/src/expr/function.rsindex 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.sltindex 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 singleSELECT 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 functionsSELECT approx_percentile_cont(0.5)WITHIN GROUP (ORDER BY c3)OVER (ROWS BETWEEN 4 PRECEDING AND CURRENT ROW)