Skip to content

Commit 2681a99

Browse files
authored
Merge branch 'main' into feat/relation-slots
2 parents c171063 + 3cb8197 commit 2681a99

150 files changed

Lines changed: 3784 additions & 225 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.178.0"
2+
".": "0.179.0"
33
}

‎CHANGELOG.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## [0.179.0](https://github.com/chio-labs/sqlbuild/compare/v0.178.0...v0.179.0) (2026-10-25)
4+
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* resolve relative DuckDB and SQLite attach paths from the project directory
9+
* reject Snowflake constructs Snowflake does not support
10+
* on Snowflake, CONNECT_BY_ISLEAF and CONNECT_BY_ISCYCLE now raise E201, and a bare VALUES list as a CTE body, including in SQL-test fixtures, now fails with P001.
11+
12+
### Features
13+
14+
* add a Postgres option to turn off temporary test functions ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
15+
16+
17+
### Bug Fixes
18+
19+
* compare scenario VARIANT and JSON columns by JSON value in local replay ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
20+
* count Python checks in the build completion line, find mocked references on both sides of parenthesised joins, and support sqb mv with Python references ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
21+
* keep make skills out of HOME ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
22+
* map rule positions back through macro expansion ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
23+
* match Snowflake star outputs against lowercase contract columns ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
24+
* Polyglot star expansion with EXCLUDE, REPLACE and RENAME, column alias lists, Snowflake typed lambdas and subscript paths, nested set operation grouping, ClickHouse DATE_TRUNC and BigQuery RANGE types ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
25+
* register DuckDB UDFs on every test connection and attach each database once ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
26+
* reject --json on sqb dbt run and sqb dbt build ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
27+
* reject Snowflake constructs Snowflake does not support ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
28+
* resolve relative DuckDB and SQLite attach paths from the project directory ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
29+
* SQL Server ISO cursor bounds, Databricks schema checks without a catalog, and ClickHouse line comments ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
30+
* SQLite text timestamp cursors, temporal cast warnings, and dlt and ingestr loading ([b91e2f3](https://github.com/chio-labs/sqlbuild/commit/b91e2f3b615943d7219e970903dae60e1b462823))
31+
332
## [0.178.0](https://github.com/chio-labs/sqlbuild/compare/v0.177.0...v0.178.0) (2026-10-25)
433

534

‎CONTRIBUTING.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ Do not compare development-profile timings with release benchmarks. Dependency o
6262
changes still require `uv sync --all-extras`; `--skip-install` does not refresh installed metadata,
6363
dependencies or console scripts.
6464

65+
Always pass `--skip-install` to `maturin develop`, or use `make dev-native` or `make fast-native`.
66+
Without it, maturin installs the `sqlbuild-cli` version that `pyproject.toml` pins from the package
67+
index, not this checkout's `crates/sqlbuild-cli`: the `sqb` executable is then a released build,
68+
and between a release commit and its publication the install fails because that version does not
69+
exist yet. `uv sync` and `uv run` install the workspace `sqlbuild-cli` and rebuild the extension
70+
when Rust sources change.
71+
6572
Before opening a pull request, run:
6673

6774
```bash

‎Cargo.lock‎

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ python-boundary = "sqlbuild-python"
5555
polyglot-floor = "sqlbuild-analysis"
5656

5757
[workspace.package]
58-
version = "0.178.0"
58+
version = "0.179.0"
5959
edition = "2024"
6060
license = "Apache-2.0"
6161
publish = false
@@ -72,14 +72,14 @@ junction = { version = "2.1.0", default-features = false }
7272
mimalloc = { version = "0.1", default-features = false, features = ["local_dynamic_tls"] }
7373
proc-macro2 = { version = "1", features = ["span-locations"] }
7474
pyo3 = { version = "0.26", features = ["abi3-py312"] }
75-
polyglot-sql = { git = "https://github.com/chio-labs/polyglot.git", rev = "1ef5056c2b315e69bd13023bd90ffe60d94880a3", default-features = false, features = [
75+
polyglot-sql = { git = "https://github.com/chio-labs/polyglot.git", rev = "8767d688c5b504ad609645e27ab77a260d91c5a1", default-features = false, features = [
7676
"ast-tools",
7777
"builder",
7878
"all-dialects",
7979
"semantic",
8080
"stacker",
8181
] }
82-
polyglot-sql-function-catalogs = { git = "https://github.com/chio-labs/polyglot.git", rev = "1ef5056c2b315e69bd13023bd90ffe60d94880a3", default-features = false, features = [
82+
polyglot-sql-function-catalogs = { git = "https://github.com/chio-labs/polyglot.git", rev = "8767d688c5b504ad609645e27ab77a260d91c5a1", default-features = false, features = [
8383
"dialect-duckdb",
8484
] }
8585
blake3 = { version = "1", features = ["rayon"] }

‎Makefile‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ E2E_DUCKDB_BUILD_CORE_PATHS := \
113113
tests/e2e/src/sqlbuild/cli/commands/main/build/test_no_load_sources.py \
114114
tests/e2e/src/sqlbuild/cli/commands/main/build/test_duckdb_storage_key.py \
115115
tests/e2e/src/sqlbuild/cli/commands/main/build/test_source_end_audits.py \
116+
tests/e2e/src/sqlbuild/cli/commands/main/build/test_python_check_outcomes.py \
117+
tests/e2e/src/sqlbuild/cli/commands/main/build/test_duckdb_attach.py \
116118
tests/e2e/src/sqlbuild/cli/commands/main/build/test_unbuilt_dependencies.py \
117119
tests/e2e/src/sqlbuild/cli/commands/main/build/test_validation_failures.py
118120

@@ -370,9 +372,13 @@ planner-differential:
370372

371373
skills:
372374
uv run python -m scripts.generate_docs_skill
373-
uv run sqb skills --global --target opencode
374375
uv run fensu skills
375376

377+
# Installs this checkout's development skill into your user-level OpenCode skills; never run by CI.
378+
.PHONY: install-global-skill
379+
install-global-skill:
380+
uv run sqb skills --global --target opencode
381+
376382

377383
DBT_EXECUTABLE ?= dbt
378384
export DBT_EXECUTABLE

‎crates/sqlbuild-analysis/src/binding_locations/constants.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
pub(crate) const UNKNOWN_TABLE_INTERNAL_CODE: &str = "B000";
55
/// The severity whose repeats at a known span compile drops.
66
pub(crate) const ERROR_SEVERITY: &str = "error";
7+
/// SQLite temporal-cast warnings, which every binding pass reports, so they are kept once.
8+
pub(crate) const SQLITE_TEMPORAL_CAST_CODE: &str = "B104";

‎crates/sqlbuild-analysis/src/binding_locations/main/locate_binding_diagnostics.rs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
33
use std::collections::HashSet;
44

5-
use crate::binding_locations::constants::{ERROR_SEVERITY, UNKNOWN_TABLE_INTERNAL_CODE};
5+
use crate::binding_locations::constants::{
6+
ERROR_SEVERITY, SQLITE_TEMPORAL_CAST_CODE, UNKNOWN_TABLE_INTERNAL_CODE,
7+
};
68
use crate::binding_locations::models::{
79
AuthoredSpan, BindingSource, LocatedDiagnostic, SeenDiagnostic,
810
};
@@ -56,7 +58,10 @@ pub fn locate_binding_diagnostics(
5658
line,
5759
column,
5860
};
59-
if seen.contains(&key) && start.is_some() && severity == ERROR_SEVERITY {
61+
if seen.contains(&key)
62+
&& start.is_some()
63+
&& (severity == ERROR_SEVERITY || code == SQLITE_TEMPORAL_CAST_CODE)
64+
{
6065
continue;
6166
}
6267
seen.insert(key);

‎crates/sqlbuild-analysis/src/compiled_project/_helpers/plain.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ pub(crate) fn plain_model_facts(model: PlainModel) -> CompiledModelFacts {
4040
constant_declarations: model.constant_declarations,
4141
analysis: None,
4242
typed_calls: model.typed_calls,
43+
expansion_passes: model.expansion_passes,
4344
}
4445
}

‎crates/sqlbuild-analysis/src/compiled_project/models.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::collections::{BTreeMap, HashMap};
55
use std::sync::Arc;
66

77
use serde_json::Value;
8+
use sqlbuild_sqltext::compiler::models::CharSpan;
89

910
/// One compile's project facts; models keep the order the compile-input stage produced them.
1011
#[derive(Clone, Debug, Default, PartialEq)]
@@ -34,6 +35,8 @@ pub struct CompiledModelFacts {
3435
pub analysis: Option<ModelAnalysisFact>,
3536
/// Each expression SQL macro call in `query_sql`, by byte range.
3637
pub typed_calls: Vec<TypedCall>,
38+
/// The expansion passes from `authored_query_sql` to `query_sql`; empty when unknown.
39+
pub expansion_passes: Vec<Vec<CharSpan>>,
3740
}
3841

3942
/// A model's effective config values with sorted keys, as the rules request has always read them.
@@ -217,6 +220,8 @@ pub struct PlainModel {
217220
pub constant_declarations: Vec<DeclarationFact>,
218221
/// Each expression SQL macro call in `query_sql`, by byte range.
219222
pub typed_calls: Vec<TypedCall>,
223+
/// The expansion passes from `authored_query_sql` to `query_sql`; empty when unknown.
224+
pub expansion_passes: Vec<Vec<CharSpan>>,
220225
}
221226

222227
/// A one-based line and column, counted in characters.

0 commit comments

Comments
 (0)