From 61d60cf4b780a1a9e22dabb6eef0236f240631f7 Mon Sep 17 00:00:00 2001 From: Krishna Vishal Date: Mon, 27 Jan 2025 23:15:04 +0530 Subject: [PATCH] Fix panic when double quoted strings are used for column names in SQL statements. Double quoted strings are not supported in SQLite. Fixes https://github.com/tursodatabase/limbo/issues/800 --- core/translate/expr.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/translate/expr.rs b/core/translate/expr.rs index 9fdf5f9c2..8fec88266 100644 --- a/core/translate/expr.rs +++ b/core/translate/expr.rs @@ -1626,7 +1626,12 @@ pub fn translate_expr( } } ast::Expr::FunctionCallStar { .. } => todo!(), - ast::Expr::Id(_) => unreachable!("Id should be resolved to a Column before translation"), + ast::Expr::Id(id) => { + crate::bail_parse_error!( + "no such column: {} - should this be a string literal in single-quotes?", + id.0 + ) + } ast::Expr::Column { database: _, table,