Skip to content

Commit

Permalink
fix: remove row_id unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Jan 2, 2025
1 parent 7fb87bb commit 7e023e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions core/translate/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,12 +1166,11 @@ fn try_index_cover(
let (pos, _) = table.get_column(&index_column.name).unwrap();
index_column_map.insert(pos, i);
}
if table.has_rowid {
let pos = table
.columns
.iter()
.position(|column| column.is_rowid_alias)
.unwrap();
if let Some(pos) = table
.columns
.iter()
.position(|column| column.is_rowid_alias)
{
index_column_map.insert(pos, index_column_map.len());
}

Expand Down
2 changes: 1 addition & 1 deletion testing/where.test
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ do_execsql_test where-age-index-seek-regression-test-2 {
} {10000}

do_execsql_test where-age-index-cover-seek {
select id, age from users where age > 90;
select id, age from users where age > 90 limit 1;
} {120|90}

do_execsql_test where-simple-between {
Expand Down

0 comments on commit 7e023e8

Please sign in to comment.