Skip to content

Commit fffcd1f

Browse files
authored
Improve err message grammar (#16566)
1 parent 9c6d6ee commit fffcd1f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

datafusion/sql/src/expr/function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
223223
} = function_args;
224224

225225
if over.is_some() && !within_group.is_empty() {
226-
return plan_err!("OVER and WITHIN GROUP clause are can not be used together. \
227-
OVER is for window function, whereas WITHIN GROUP is for ordered set aggregate function");
226+
return plan_err!("OVER and WITHIN GROUP clause cannot be used together. \
227+
OVER is for window functions, whereas WITHIN GROUP is for ordered set aggregate functions");
228228
}
229229

230230
// If function is a window function (it has an OVER clause),

datafusion/sqllogictest/test_files/aggregate.slt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ statement error DataFusion error: This feature is not implemented: Only a single
170170
SELECT approx_percentile_cont(0.95) WITHIN GROUP (ORDER BY c5, c12) FROM aggregate_test_100
171171

172172
# Not supported over sliding windows
173-
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
173+
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
174174
SELECT approx_percentile_cont(0.5)
175175
WITHIN GROUP (ORDER BY c3)
176176
OVER (ROWS BETWEEN 4 PRECEDING AND CURRENT ROW)

0 commit comments

Comments
 (0)