Add design specs for subquery execution (sub-project 11) and transact… #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| compiler: [g++, clang++] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build and test | |
| env: | |
| CXX: ${{ matrix.compiler }} | |
| run: make -f Makefile.new clean && make -f Makefile.new all | |
| macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build and test | |
| run: make -f Makefile.new clean && make -f Makefile.new all | |
| benchmark: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build release and run benchmarks | |
| run: | | |
| sed 's/-g -O2/-O3/' Makefile.new > /tmp/Makefile.release | |
| make -f /tmp/Makefile.release clean | |
| make -f /tmp/Makefile.release lib | |
| make -f /tmp/Makefile.release test | |
| make -f /tmp/Makefile.release bench 2>&1 | tail -20 | |
| ./run_bench --benchmark_format=json > benchmark_results.json 2>/dev/null | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: benchmark_results.json | |
| corpus-test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: make -f Makefile.new all && make -f Makefile.new build-corpus-test | |
| - name: Test against SQLGlot | |
| run: | | |
| git clone --depth 1 -q https://github.com/tobymao/sqlglot.git /tmp/sqlglot | |
| cat /tmp/sqlglot/tests/fixtures/identity.sql /tmp/sqlglot/tests/fixtures/tpch.sql \ | |
| /tmp/sqlglot/tests/fixtures/tpcds.sql 2>/dev/null | \ | |
| grep -v '^$' | grep -v '^--' | ./corpus_test mysql | |
| - name: Test against CockroachDB | |
| run: | | |
| git clone --depth 1 --sparse -q https://github.com/cockroachdb/cockroach.git /tmp/cockroach | |
| cd /tmp/cockroach && git sparse-checkout set pkg/sql/parser/testdata 2>/dev/null && cd - | |
| grep -rh "^[A-Z]" /tmp/cockroach/pkg/sql/parser/testdata/ 2>/dev/null | \ | |
| grep -v "^--" | grep -v "^#" | head -5000 | ./corpus_test pgsql | |
| - name: Test against Vitess | |
| run: | | |
| git clone --depth 1 --sparse -q https://github.com/vitessio/vitess.git /tmp/vitess | |
| cd /tmp/vitess && git sparse-checkout set go/vt/sqlparser 2>/dev/null && cd - | |
| grep -ohP '"((?:select|SELECT|insert|INSERT|update|UPDATE|delete|DELETE|set|SET|create|CREATE|alter|ALTER|drop|DROP|explain|EXPLAIN)[^"]*)"' \ | |
| /tmp/vitess/go/vt/sqlparser/parse_test.go 2>/dev/null | \ | |
| sed 's/^"//' | sed 's/"$//' | head -2000 | ./corpus_test mysql | |
| - name: Test against sqlparser-rs | |
| run: | | |
| git clone --depth 1 -q https://github.com/apache/datafusion-sqlparser-rs.git /tmp/sqlparser-rs | |
| grep -ohP '"((?:SELECT|INSERT|UPDATE|DELETE|SET|CREATE|ALTER|DROP|EXPLAIN|WITH)[^"]*)"' \ | |
| /tmp/sqlparser-rs/tests/sqlparser_mysql.rs 2>/dev/null | \ | |
| sed 's/^"//' | sed 's/"$//' | sed 's/\\"/"/g' | ./corpus_test mysql | |
| grep -ohP '"((?:SELECT|INSERT|UPDATE|DELETE|SET|CREATE|ALTER|DROP|EXPLAIN|WITH)[^"]*)"' \ | |
| /tmp/sqlparser-rs/tests/sqlparser_postgres.rs 2>/dev/null | \ | |
| sed 's/^"//' | sed 's/"$//' | sed 's/\\"/"/g' | ./corpus_test pgsql |