datafusion-query-builder 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datafusion_query_builder-0.1.2/.github/workflows/ci.yml +122 -0
- datafusion_query_builder-0.1.2/.gitignore +13 -0
- datafusion_query_builder-0.1.2/Cargo.lock +3281 -0
- datafusion_query_builder-0.1.2/Cargo.toml +51 -0
- datafusion_query_builder-0.1.2/LICENSE +21 -0
- datafusion_query_builder-0.1.2/PKG-INFO +131 -0
- datafusion_query_builder-0.1.2/README.md +110 -0
- datafusion_query_builder-0.1.2/pyproject.toml +33 -0
- datafusion_query_builder-0.1.2/python/datafusion_query_builder/__init__.py +63 -0
- datafusion_query_builder-0.1.2/python/datafusion_query_builder/__init__.pyi +163 -0
- datafusion_query_builder-0.1.2/python/datafusion_query_builder/py.typed +0 -0
- datafusion_query_builder-0.1.2/src/expr.rs +266 -0
- datafusion_query_builder-0.1.2/src/functions.rs +61 -0
- datafusion_query_builder-0.1.2/src/lib.rs +29 -0
- datafusion_query_builder-0.1.2/src/lower.rs +680 -0
- datafusion_query_builder-0.1.2/src/python.rs +943 -0
- datafusion_query_builder-0.1.2/src/query.rs +259 -0
- datafusion_query_builder-0.1.2/src/render.rs +57 -0
- datafusion_query_builder-0.1.2/tests/core.rs +253 -0
- datafusion_query_builder-0.1.2/tests/properties.proptest-regressions +7 -0
- datafusion_query_builder-0.1.2/tests/properties.rs +311 -0
- datafusion_query_builder-0.1.2/tests/test_python.py +180 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
# Read-only by default (enough to clone this private repo); the publish job opts into id-token below.
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
CARGO_TERM_COLOR: always
|
|
19
|
+
# The lib needs the dollar-brace sqlparser fork; fetch git deps with the CLI for reliability.
|
|
20
|
+
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
|
|
21
|
+
# uv provisions and selects this interpreter automatically (no venv paths needed).
|
|
22
|
+
UV_PYTHON: "3.12"
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
lint:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
30
|
+
with:
|
|
31
|
+
components: rustfmt, clippy
|
|
32
|
+
- uses: Swatinem/rust-cache@v2
|
|
33
|
+
- run: cargo fmt --all -- --check
|
|
34
|
+
# Lint the core and the property-test oracle. (The `python`/`test-embed` cfgs are linted in
|
|
35
|
+
# the test job where an interpreter is set up.)
|
|
36
|
+
- run: cargo clippy --all-targets --features datafusion-oracle -- -D warnings
|
|
37
|
+
|
|
38
|
+
test:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
43
|
+
- uses: Swatinem/rust-cache@v2
|
|
44
|
+
- uses: astral-sh/setup-uv@v7
|
|
45
|
+
# uv creates the env with UV_PYTHON; later `uv run`/`uv pip` auto-detect it.
|
|
46
|
+
- run: uv venv
|
|
47
|
+
# Core rendering tests (pure Rust, no engine).
|
|
48
|
+
- run: cargo test --test core
|
|
49
|
+
# Property tests with DataFusion as the execution oracle.
|
|
50
|
+
- run: cargo test --features datafusion-oracle --test properties
|
|
51
|
+
# Coercion tests against an embedded interpreter — `uv run` exposes the venv so pyo3's
|
|
52
|
+
# auto-initialize finds it (no PYO3_PYTHON needed).
|
|
53
|
+
- run: uv run --no-project cargo test --lib --features test-embed
|
|
54
|
+
# Build + install the extension (maturin backend) and smoke-test it.
|
|
55
|
+
- run: uv pip install -e .
|
|
56
|
+
- run: uv run --no-project python tests/test_python.py
|
|
57
|
+
|
|
58
|
+
build:
|
|
59
|
+
name: build wheel (${{ matrix.platform.target }})
|
|
60
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
61
|
+
strategy:
|
|
62
|
+
fail-fast: false
|
|
63
|
+
matrix:
|
|
64
|
+
platform:
|
|
65
|
+
# macbooks: Apple Silicon only.
|
|
66
|
+
- { runner: macos-14, target: aarch64-apple-darwin, manylinux: '' }
|
|
67
|
+
# linux servers: x86_64 + aarch64 (the aarch64 manylinux wheel covers GCP c4a / Axion ARM
|
|
68
|
+
# on Ubuntu). maturin cross-compiles aarch64 in a manylinux container.
|
|
69
|
+
- { runner: ubuntu-latest, target: x86_64, manylinux: auto }
|
|
70
|
+
- { runner: ubuntu-latest, target: aarch64, manylinux: auto }
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@v4
|
|
73
|
+
- name: build abi3 wheel
|
|
74
|
+
uses: PyO3/maturin-action@v1
|
|
75
|
+
with:
|
|
76
|
+
target: ${{ matrix.platform.target }}
|
|
77
|
+
manylinux: ${{ matrix.platform.manylinux }}
|
|
78
|
+
args: --release --out dist
|
|
79
|
+
# maturin reads features (python, extension-module) from pyproject.toml [tool.maturin].
|
|
80
|
+
- uses: actions/upload-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
name: wheels-${{ matrix.platform.target }}
|
|
83
|
+
path: dist/*.whl
|
|
84
|
+
|
|
85
|
+
sdist:
|
|
86
|
+
runs-on: ubuntu-latest
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v4
|
|
89
|
+
- name: build sdist
|
|
90
|
+
uses: PyO3/maturin-action@v1
|
|
91
|
+
with:
|
|
92
|
+
command: sdist
|
|
93
|
+
args: --out dist
|
|
94
|
+
- uses: actions/upload-artifact@v4
|
|
95
|
+
with:
|
|
96
|
+
name: sdist
|
|
97
|
+
path: dist/*.tar.gz
|
|
98
|
+
|
|
99
|
+
# Publish to PyPI on tag, via OIDC trusted publishing — no API token/secret.
|
|
100
|
+
# Configure the trusted publisher once at https://pypi.org/manage/account/publishing/
|
|
101
|
+
# (project: datafusion-query-builder, workflow: ci.yml, environment: pypi).
|
|
102
|
+
release:
|
|
103
|
+
needs: [lint, test, build, sdist]
|
|
104
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
environment: pypi
|
|
107
|
+
permissions:
|
|
108
|
+
contents: read
|
|
109
|
+
id-token: write
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/download-artifact@v4
|
|
112
|
+
with:
|
|
113
|
+
path: dist
|
|
114
|
+
pattern: wheels-*
|
|
115
|
+
merge-multiple: true
|
|
116
|
+
- uses: actions/download-artifact@v4
|
|
117
|
+
with:
|
|
118
|
+
name: sdist
|
|
119
|
+
path: dist
|
|
120
|
+
- name: publish to PyPI
|
|
121
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
122
|
+
# No `password:` — authentication is via the GitHub OIDC trusted publisher.
|