Skip to content

Commit

Permalink
small test case for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tania Bogatsch committed Oct 18, 2019
1 parent c9f8d39 commit a5e2f90
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Expand Up @@ -11,6 +11,7 @@ add_subdirectory(helpers)
add_subdirectory(monetdb)
add_subdirectory(sql)
add_subdirectory(optimizer)
add_subdirectory(predicate_optimization)

if(NOT WIN32)
add_subdirectory(sqlserver)
Expand Down
4 changes: 4 additions & 0 deletions test/predicate_optimization/CMakeLists.txt
@@ -0,0 +1,4 @@
add_library_unity(test_filter_predicate OBJECT debug_predicate_query.cpp)
set(ALL_OBJECT_FILES
${ALL_OBJECT_FILES} $<TARGET_OBJECTS:test_filter_predicate>
PARENT_SCOPE)
15 changes: 15 additions & 0 deletions test/predicate_optimization/debug_predicate_query.cpp
@@ -0,0 +1,15 @@
#include "catch.hpp"
#include "dbgen.hpp"
#include "test_helpers.hpp"

using namespace duckdb;
using namespace std;

TEST_CASE("Debug Filter Predicate Optimization", "[debug_fpo]") {
unique_ptr<QueryResult> result;
DuckDB db(nullptr);
Connection con(db);

tpch::dbgen(1, db);
REQUIRE_NO_FAIL(con.Query("SELECT l_orderkey, l_comment FROM lineitem WHERE l_orderkey % 5 == 0 AND l_comment LIKE '%str%';"));
}

0 comments on commit a5e2f90

Please sign in to comment.