mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-05 08:14:25 +01:00
Merge 'Return parse error if NULLS LAST used in ORDER BY' from Jussi Saurio
we don't support this yet, so let's not silently ignore it either Closes #3945
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user