Return parse error if NULLS LAST used in ORDER BY

we don't support this yet, so let's not silently ignore it either
This commit is contained in:
Jussi Saurio
2025-11-13 10:47:17 +02:00
parent 7c96b6d9f9
commit 950184a2c6

View File

@@ -182,6 +182,13 @@ fn prepare_one_select_plan(
query_destination: QueryDestination,
connection: &Arc<crate::Connection>,
) -> Result<SelectPlan> {
if order_by
.iter()
.filter_map(|o| o.nulls)
.any(|n| n == ast::NullsOrder::Last)
{
crate::bail_parse_error!("NULLS LAST is not supported yet in ORDER BY");
}
match select {
ast::OneSelect::Select {
mut columns,