mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 07:24:19 +01:00
Merge 'select: fix bug with referring to a mixed-case alias' from Jussi Saurio
was running some clickbench queries against limbo and noticed this one Closes #1006
This commit is contained in:
@@ -135,7 +135,7 @@ pub fn bind_column_references(
|
||||
for result_column in result_columns.iter() {
|
||||
if result_column
|
||||
.name(referenced_tables)
|
||||
.map_or(false, |name| name == &normalized_id)
|
||||
.map_or(false, |name| name.eq_ignore_ascii_case(&normalized_id))
|
||||
{
|
||||
*expr = result_column.expr.clone();
|
||||
return Ok(());
|
||||
|
||||
@@ -136,4 +136,8 @@ do_execsql_test order-by-agg-not-mentioned-in-select {
|
||||
Carolyn|118
|
||||
Katelyn|40
|
||||
Erik|88
|
||||
Collin|15}
|
||||
Collin|15}
|
||||
|
||||
do_execsql_test case-insensitive-alias {
|
||||
select u.first_name as fF, count(1) > 0 as cC from users u where fF = 'Jamie' group by fF order by cC;
|
||||
} {Jamie|1}
|
||||
|
||||
Reference in New Issue
Block a user