Skip to content

Commit

Permalink
Rework validation of names and aliases for aggregate UDFs
Browse files Browse the repository at this point in the history
Add better validation that `name = ...` and `alias = ...` line up when
there is a mismatch between the `BasicUdf` and `AggregateUdf`
implementation, and fix a problem that was disallowing use of aliases in
aggregate UDFs.

Error messages are significantly improved.

Fixes <#59>
  • Loading branch information
tgross35 committed May 7, 2024
1 parent f2eba5d commit ce21bd8
Show file tree
Hide file tree
Showing 17 changed files with 1,302 additions and 117 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/validation-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/[email protected]
with:
components: clippy
- run: rustup default 1.72.0 && rustup component add clippy && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features --all-targets
- run: cargo clippy --no-default-features --all-targets

clippy:
name: "MSRV"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup default 1.65.0 && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features --all-targets -- -D warnings
- run: cargo clippy --no-default-features --all-targets -- -D warnings
- run: cargo check --all-features --all-targets
- run: cargo check --no-default-features --all-targets

test:
strategy:
Expand All @@ -53,19 +61,18 @@ jobs:
MYSQLCLIENT_LIB_DIR: C:\mysql\lib
steps:
- uses: actions/checkout@v2
- name: List files
run: |
pwd
ls
# use a version later than MSRV for trybuild consistency
- run: rustup default 1.77 && rustup update
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/[email protected]
- run: cargo test

integration:
name: "Integration testing (docker)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup default stable && rustup update
- uses: Swatinem/rust-cache@v2
- name: Cache Docker layers
uses: actions/cache@v2
id: cache-docker
Expand Down Expand Up @@ -104,7 +111,6 @@ jobs:
-e RUST_LIB_BACKTRACE=1
--name mdb-example-container
mdb-example-so
- uses: dtolnay/rust-toolchain@stable
- name: Run integration testing
# Run only integration tests with `--test '*'`
run: cargo test -p udf-examples --test '*' --features backend
Expand All @@ -121,9 +127,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: rustup default nightly && rustup component add miri && rustup update
- uses: Swatinem/rust-cache@v2
- name: Run Miri
env:
Expand All @@ -136,9 +140,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: rustup default nightly && rustup component add rustfmt && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- uses: actions/setup-python@v3
Expand All @@ -151,7 +153,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: rustup default nightly && rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo doc

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
**/target
**/Cargo.lock
**/.DS_Store
.docker-cargo/
Loading

0 comments on commit ce21bd8

Please sign in to comment.