Remove 2nd shell in vtab tests, fix expr translation in main loop

This commit is contained in:
PThorpe92
2025-04-17 13:47:46 -04:00
parent a25a02efe1
commit d02900294e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
use limbo_ext::{OrderByInfo, VTabKind};
use limbo_ext::VTabKind;
use limbo_sqlite3_parser::ast;
use crate::{
@@ -335,7 +335,8 @@ pub fn open_loop(
if let ast::Expr::Binary(lhs, _, rhs) =
&predicates[pred_idx].expr
{
let expr = if is_rhs { rhs } else { lhs };
// translate the opposite side of the referenced vtab column
let expr = if is_rhs { lhs } else { rhs };
// argv_index is 1-based; adjust to get the proper register offset.
let target_reg = start_reg + (argv_index - 1) as usize;
translate_expr(

View File

@@ -343,7 +343,6 @@ def test_kv():
# first, create a normal table to ensure no issues
limbo.execute_dot("CREATE TABLE other (a,b,c);")
limbo.execute_dot("INSERT INTO other values (23,32,23);")
limbo = TestLimboShell()
limbo.run_test_fn(
"create virtual table t using kv_store;",
lambda res: "Module kv_store not found" in res,