Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -213,24 +213,24 @@ sqlbuild-scopes = { path = "crates/sqlbuild-scopes" }
sqlbuild-sqltext = { path = "crates/sqlbuild-sqltext" }
sqlbuild-state = { path = "crates/sqlbuild-state" }
# SQL lint Rules, quality Rules and the formatter.
sqlclean = { git = "https://github.com/sqlstack-io/sqlclean.git", rev = "8550e6a45c95a4a9e8470a570ae786d6f0deee8e" }
sqlclean = { git = "https://github.com/sqlstack-io/sqlclean.git", rev = "462a98779a2a11ff11884ff79feefbfb190ab8d1" }
# SQL change fingerprints over SQLQuack's tokenizers.
sqlquack-fingerprint = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
sqlquack-fingerprint = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
# Scopes, name resolution, types and lineage for the native analysis route.
sqlquack-semantics = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174", features = ["bigquery", "clickhouse", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
sqlquack-semantics = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d", features = ["bigquery", "clickhouse", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
# SQLQuack's Snowflake-family parser and tokenizer, reached as SQLQuack exposes them.
sqlquack-parse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-parse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
# SQLQuack's syntax tree and lossless tokens.
sqlquack-syntax = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
# SQLQuack's tokenizer: lossless tokens and tokenize failures.
sqlquack-tokenize = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-bigquery = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-clickhouse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-databricks = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-duckdb = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-postgres = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-sqlite = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "7a8501afa69eb846637e4eb85604d6726fc33174" }
sqlquack-tokenize = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-bigquery = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-clickhouse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-databricks = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-duckdb = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-postgres = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-sqlite = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
sqlquack-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
stacker = "0.1"
# Counts heap allocations in growth tests, which measure work instead of time.
stats_alloc = "0.1"
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ E2E_DUCKDB_BUILD_INCREMENTAL_PATHS := \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_capped_microbatch_build.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_changed_builds.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_concurrent_microbatch_build.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_cursor_window_floors.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_cursor_observations.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_cursor_runtime_failures.py \
tests/e2e/src/sqlbuild/cli/commands/main/build/test_dropped_relation_rebuild.py \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A folder, an expansion, a glob, an intersection's name, a job name and a repeated name: one named node.
# A folder, an expansion, a glob, an intersection's name and a repeated name: one named node.
name = "orders_folder_job"
description = "Selects the orders pipeline without listing it."
select = "sql/models/orders +order_totals stg_* order_totals,tag:orders orders_listed_job order_totals"
select = "sql/models/orders +order_totals stg_* order_totals,tag:orders order_totals"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MODEL (description "Synthetic orders edge case order_totals");
MODEL (description "Synthetic orders edge case order_totals", tags [orders]);
SELECT 1 AS order_id
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import yaml

SOURCES_DIR = Path(__file__).resolve().parents[2] / "sql" / "sources"
SOURCES_DIR = Path(__file__).resolve().parents[3] / "sql" / "sources"
BATCH_SIZE = 500
JSON_TYPES = {"VARIANT": "", "OBJECT": "::OBJECT", "ARRAY": "::ARRAY"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ WITH orders AS (

valid_orders AS (
SELECT
o.order_id,
o.customer_id,
o.placed_at,
o.placed_date_local,
o.amount_usd,
o.sales_channel
FROM orders AS o
order_id,
customer_id,
placed_at,
placed_date_local,
amount_usd,
sales_channel
FROM orders
WHERE NOT @sql.is_status(@enum("order_status").CANCELLED)
),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ final AS (
(f.group_hash = b.group_hash)::BOOLEAN AS group_hash_is_order_free
FROM checks AS c
INNER JOIN group_sizes AS s
ON c.group_code = s.group_code,
group_names AS n,
hash_forward AS f,
hash_backward AS b
WHERE
n.group_code = c.group_code
AND f.group_code = c.group_code
AND b.group_code = c.group_code
ON c.group_code = s.group_code
INNER JOIN group_names AS n
ON c.group_code = n.group_code
INNER JOIN hash_forward AS f
ON c.group_code = f.group_code
INNER JOIN hash_backward AS b
ON c.group_code = b.group_code
)

SELECT *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ final AS (
d.moved_at_local,
@sql.json_text(d.metadata:operator) AS operator_id
FROM deduplicated AS d
INNER JOIN effective_ids AS e
ON d.movement_id = e.movement_id
WHERE d.movement_id IN (SELECT e.movement_id FROM effective_ids AS e)
)

SELECT *
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/duckshop/scripts/duckdb_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def write_declarations(out: pathlib.Path) -> None:
folders.pop() / "_sqlbuild" / "_enums" if len(folders) == 1 else out / "sql" / "enums"
)
keep[folder / f"{name}.sql"] = types(enums[name].read_text())
for gone in ("tests", "macros", "rules", "constants", "enums"):
for gone in ("tests", "rules", "sql/macros", "sql/constants", "sql/enums"):
shutil.rmtree(out / gone, ignore_errors=True)
for folder in ("_macros", "macros", "constants", "_constants", "enums", "_enums"):
for path in list(out.glob(f"sql/models/**/_sqlbuild/{folder}")):
Expand Down
Loading
Loading