Skip to content

Commit 77e53df

Browse files
committed
ci: build and test on push; keep memo merge out of assert
The memo test performed its group merge inside assert(), which NDEBUG strips in Release builds, so the merged-group validation terminated. The call now runs unconditionally with its result checked. Adds the two-platform build-and-test workflow and the README badge.
1 parent aa90540 commit 77e53df

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build-and-test:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, macos-latest]
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Configure
18+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
19+
- name: Build
20+
run: cmake --build build --parallel
21+
- name: Test
22+
run: ctest --test-dir build --output-on-failure

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Vectorized SQL Query Engine
22

3+
[![CI](https://github.com/Aly700/vectorized-sql-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/Aly700/vectorized-sql-engine/actions/workflows/ci.yml)
4+
35
## Scope
46

57
A columnar analytical engine whose hardest boundary is the optimizer: SQL is parsed and bound into relational algebra, rules produce equivalent plans, and a Cascades-style memo chooses a low-cost vectorized physical plan without changing semantics.

‎tests/memo.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ void assert_cross_group_duplicate_expression_merges_groups() {
202202
assert(left_right != right_left);
203203

204204
try {
205-
assert(memo.insert_equivalent(left_right, join_expression(right, left)));
205+
const auto merged = memo.insert_equivalent(left_right, join_expression(right, left));
206+
assert(merged);
206207
} catch (const std::logic_error& error) {
207208
std::cerr << "cross-group duplicate did not merge\n"
208209
<< "error: " << error.what() << "\n"

0 commit comments

Comments
 (0)