Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index selection pass for KQIR planning #2278

Merged
merged 10 commits into from
Apr 29, 2024
Prev Previous commit
Next Next commit
add more tests
  • Loading branch information
PragmaTwice committed Apr 28, 2024
commit 10a9fb76c2a1007bbae6c91c7310dad5fd5614ed
6 changes: 6 additions & 0 deletions tests/cppunit/ir_pass_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,10 @@ TEST(IRPassTest, IndexSelection) {
ASSERT_EQ(
PassManager::Execute(passes, ParseS(sc, "select * from ia where t1 hastag \"a\" or t1 hastag \"b\""))->Dump(),
"project *: (merge tag-scan t1, a, (filter not t1 hastag \"a\": tag-scan t1, b))");

ASSERT_EQ(
PassManager::Execute(
passes, ParseS(sc, "select * from ia where (n1 < 2 or n1 >= 3) and (n1 >= 1 and n1 < 4) and not n3 != 1"))
->Dump(),
"project *: (filter n3 = 1: (merge numeric-scan n1, [1, 2), asc, numeric-scan n1, [3, 4), asc))");
}
Loading