Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/translate/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ fn prepare_one_select_plan(
result_columns.push(ResultSetColumn {
// these result_columns work as placeholders for the values, so the expr doesn't matter
expr: ast::Expr::Literal(ast::Literal::Numeric(i.to_string())),
alias: None,
alias: Some(format!("column{}", i + 1)),
contains_aggregates: false,
});
}
Expand Down
5 changes: 5 additions & 0 deletions testing/select.test
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,11 @@ do_execsql_test_on_specific_db {:memory:} affinity-conversion-2 {
SELECT * FROM t WHERE a == 2;
} {2}

# https://github.com/tursodatabase/turso/issues/3950
do_execsql_test select-values-column-name {
SELECT column1 FROM (VALUES(123));
} {123}

# Test suite for SQLite affinity conversion in WHERE clauses

# ============================================
Expand Down
Loading