diff --git a/THIRD_PARTY_NOTICES b/THIRD_PARTY_NOTICES index de5b44d4b..14f692909 100644 --- a/THIRD_PARTY_NOTICES +++ b/THIRD_PARTY_NOTICES @@ -62,10 +62,12 @@ SQLQuack's tokenizer, parser and syntax tree are a modified fork of polyglot The derived code is in crates/sqlquack-syntax-snowflake, which now holds most of it, crates/sqlquack-syntax and crates/sqlquack-derive. The exact-check corpus corpora/polyglot-check/polyglot_tests.json holds the SQL inputs of polyglot's tests. -SQLQuack's DuckDB result-type rules, in crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, -are ported from polyglot's engine type rules, and the fixture -crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json is polyglot's -tests/fixtures/engine_types/duckdb.json, the result types DuckDB bound for its synthetic cases. +DuckDB's widening of a signed integer mixed with an unsigned one, unsigned_coercion in +crates/sqlquack-semantics/src/duckdb/profile/_helpers/duck_types.rs, is ported from polyglot's +type annotation. SQLQuack's other DuckDB result-type rules, in +crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, and the fixture +crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json are +SQLQuack's own, written in its fork of polyglot and never part of upstream polyglot. The semantic checks in crates/sqlquack-semantics/src/lineage/_helpers/checks are ported from polyglot's validation: the type families in families.rs, the built-in function signatures in signatures.rs and the scope rules in scope_rules.rs, and the type checks and their messages in diff --git a/crates/sqlquack/THIRD_PARTY_NOTICES b/crates/sqlquack/THIRD_PARTY_NOTICES index de5b44d4b..14f692909 100644 --- a/crates/sqlquack/THIRD_PARTY_NOTICES +++ b/crates/sqlquack/THIRD_PARTY_NOTICES @@ -62,10 +62,12 @@ SQLQuack's tokenizer, parser and syntax tree are a modified fork of polyglot The derived code is in crates/sqlquack-syntax-snowflake, which now holds most of it, crates/sqlquack-syntax and crates/sqlquack-derive. The exact-check corpus corpora/polyglot-check/polyglot_tests.json holds the SQL inputs of polyglot's tests. -SQLQuack's DuckDB result-type rules, in crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, -are ported from polyglot's engine type rules, and the fixture -crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json is polyglot's -tests/fixtures/engine_types/duckdb.json, the result types DuckDB bound for its synthetic cases. +DuckDB's widening of a signed integer mixed with an unsigned one, unsigned_coercion in +crates/sqlquack-semantics/src/duckdb/profile/_helpers/duck_types.rs, is ported from polyglot's +type annotation. SQLQuack's other DuckDB result-type rules, in +crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, and the fixture +crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json are +SQLQuack's own, written in its fork of polyglot and never part of upstream polyglot. The semantic checks in crates/sqlquack-semantics/src/lineage/_helpers/checks are ported from polyglot's validation: the type families in families.rs, the built-in function signatures in signatures.rs and the scope rules in scope_rules.rs, and the type checks and their messages in diff --git a/python/THIRD_PARTY_NOTICES b/python/THIRD_PARTY_NOTICES index de5b44d4b..14f692909 100644 --- a/python/THIRD_PARTY_NOTICES +++ b/python/THIRD_PARTY_NOTICES @@ -62,10 +62,12 @@ SQLQuack's tokenizer, parser and syntax tree are a modified fork of polyglot The derived code is in crates/sqlquack-syntax-snowflake, which now holds most of it, crates/sqlquack-syntax and crates/sqlquack-derive. The exact-check corpus corpora/polyglot-check/polyglot_tests.json holds the SQL inputs of polyglot's tests. -SQLQuack's DuckDB result-type rules, in crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, -are ported from polyglot's engine type rules, and the fixture -crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json is polyglot's -tests/fixtures/engine_types/duckdb.json, the result types DuckDB bound for its synthetic cases. +DuckDB's widening of a signed integer mixed with an unsigned one, unsigned_coercion in +crates/sqlquack-semantics/src/duckdb/profile/_helpers/duck_types.rs, is ported from polyglot's +type annotation. SQLQuack's other DuckDB result-type rules, in +crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, and the fixture +crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json are +SQLQuack's own, written in its fork of polyglot and never part of upstream polyglot. The semantic checks in crates/sqlquack-semantics/src/lineage/_helpers/checks are ported from polyglot's validation: the type families in families.rs, the built-in function signatures in signatures.rs and the scope rules in scope_rules.rs, and the type checks and their messages in diff --git a/website/src/content/docs/docs/credits.mdx b/website/src/content/docs/docs/credits.mdx index dc1230b11..4755569be 100644 --- a/website/src/content/docs/docs/credits.mdx +++ b/website/src/content/docs/docs/credits.mdx @@ -7,14 +7,14 @@ SQLQuack wouldn't exist without two projects: - **[Polyglot](https://github.com/tobilg/polyglot)** by Tobias ([@tobilg](https://github.com/tobilg)). SQLQuack's tokenizer, parser and syntax tree are a - modified fork of Polyglot's, and much of that code is still his. Its DuckDB result-type rules - and its semantic checks are also ported from Polyglot. + modified fork of Polyglot's, and much of that code is still his. Its semantic checks and its + rule for widening mixed signed and unsigned integers are also ported from Polyglot. - **[SQLGlot](https://github.com/tobymao/sqlglot)** by Toby Mao and contributors. Polyglot is a Rust port of SQLGlot and is based on its design, and so is SQLQuack's parser. SQLQuack also uses the Snowflake SQL of SQLGlot's test suite as case inputs, with the expected answers recorded from Snowflake itself. -The translation to DuckDB and the recorded evidence behind it are SQLQuack's own. +The translation to DuckDB, the typing and the recorded evidence behind them are SQLQuack's own. SQLQuack goes a different way from both projects on translation. It doesn't rewrite the tree and print it out. It checks each rule against recorded warehouse results and refuses what it can't prove.