Skip to content

Commit 86d7b36

Browse files
committed
docs: credit only the integer widening rule of DuckDB typing to Polyglot
1 parent 321f2a6 commit 86d7b36

4 files changed

Lines changed: 21 additions & 15 deletions

File tree

‎THIRD_PARTY_NOTICES‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ SQLQuack's tokenizer, parser and syntax tree are a modified fork of polyglot
6262
The derived code is in crates/sqlquack-syntax-snowflake, which now holds most of it,
6363
crates/sqlquack-syntax and crates/sqlquack-derive. The exact-check corpus
6464
corpora/polyglot-check/polyglot_tests.json holds the SQL inputs of polyglot's tests.
65-
SQLQuack's DuckDB result-type rules, in crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs,
66-
are ported from polyglot's engine type rules, and the fixture
67-
crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json is polyglot's
68-
tests/fixtures/engine_types/duckdb.json, the result types DuckDB bound for its synthetic cases.
65+
DuckDB's widening of a signed integer mixed with an unsigned one, unsigned_coercion in
66+
crates/sqlquack-semantics/src/duckdb/profile/_helpers/duck_types.rs, is ported from polyglot's
67+
type annotation. SQLQuack's other DuckDB result-type rules, in
68+
crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, and the fixture
69+
crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json are
70+
SQLQuack's own, written in its fork of polyglot and never part of upstream polyglot.
6971
The semantic checks in crates/sqlquack-semantics/src/lineage/_helpers/checks are ported from
7072
polyglot's validation: the type families in families.rs, the built-in function signatures in
7173
signatures.rs and the scope rules in scope_rules.rs, and the type checks and their messages in

‎crates/sqlquack/THIRD_PARTY_NOTICES‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ SQLQuack's tokenizer, parser and syntax tree are a modified fork of polyglot
6262
The derived code is in crates/sqlquack-syntax-snowflake, which now holds most of it,
6363
crates/sqlquack-syntax and crates/sqlquack-derive. The exact-check corpus
6464
corpora/polyglot-check/polyglot_tests.json holds the SQL inputs of polyglot's tests.
65-
SQLQuack's DuckDB result-type rules, in crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs,
66-
are ported from polyglot's engine type rules, and the fixture
67-
crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json is polyglot's
68-
tests/fixtures/engine_types/duckdb.json, the result types DuckDB bound for its synthetic cases.
65+
DuckDB's widening of a signed integer mixed with an unsigned one, unsigned_coercion in
66+
crates/sqlquack-semantics/src/duckdb/profile/_helpers/duck_types.rs, is ported from polyglot's
67+
type annotation. SQLQuack's other DuckDB result-type rules, in
68+
crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, and the fixture
69+
crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json are
70+
SQLQuack's own, written in its fork of polyglot and never part of upstream polyglot.
6971
The semantic checks in crates/sqlquack-semantics/src/lineage/_helpers/checks are ported from
7072
polyglot's validation: the type families in families.rs, the built-in function signatures in
7173
signatures.rs and the scope rules in scope_rules.rs, and the type checks and their messages in

‎python/THIRD_PARTY_NOTICES‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ SQLQuack's tokenizer, parser and syntax tree are a modified fork of polyglot
6262
The derived code is in crates/sqlquack-syntax-snowflake, which now holds most of it,
6363
crates/sqlquack-syntax and crates/sqlquack-derive. The exact-check corpus
6464
corpora/polyglot-check/polyglot_tests.json holds the SQL inputs of polyglot's tests.
65-
SQLQuack's DuckDB result-type rules, in crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs,
66-
are ported from polyglot's engine type rules, and the fixture
67-
crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json is polyglot's
68-
tests/fixtures/engine_types/duckdb.json, the result types DuckDB bound for its synthetic cases.
65+
DuckDB's widening of a signed integer mixed with an unsigned one, unsigned_coercion in
66+
crates/sqlquack-semantics/src/duckdb/profile/_helpers/duck_types.rs, is ported from polyglot's
67+
type annotation. SQLQuack's other DuckDB result-type rules, in
68+
crates/sqlquack-semantics/src/duckdb/profile/_helpers/typing.rs, and the fixture
69+
crates/sqlquack-semantics/src/duckdb/profile/tests/fixtures/duckdb_engine_types.json are
70+
SQLQuack's own, written in its fork of polyglot and never part of upstream polyglot.
6971
The semantic checks in crates/sqlquack-semantics/src/lineage/_helpers/checks are ported from
7072
polyglot's validation: the type families in families.rs, the built-in function signatures in
7173
signatures.rs and the scope rules in scope_rules.rs, and the type checks and their messages in

‎website/src/content/docs/docs/credits.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ SQLQuack wouldn't exist without two projects:
77

88
- **[Polyglot](https://github.com/tobilg/polyglot)** by Tobias
99
([@tobilg](https://github.com/tobilg)). SQLQuack's tokenizer, parser and syntax tree are a
10-
modified fork of Polyglot's, and much of that code is still his. Its DuckDB result-type rules
11-
and its semantic checks are also ported from Polyglot.
10+
modified fork of Polyglot's, and much of that code is still his. Its semantic checks and its
11+
rule for widening mixed signed and unsigned integers are also ported from Polyglot.
1212
- **[SQLGlot](https://github.com/tobymao/sqlglot)** by Toby Mao and contributors. Polyglot is a
1313
Rust port of SQLGlot and is based on its design, and so is SQLQuack's parser. SQLQuack also uses
1414
the Snowflake SQL of SQLGlot's test suite as case inputs, with the expected answers recorded from
1515
Snowflake itself.
1616

17-
The translation to DuckDB and the recorded evidence behind it are SQLQuack's own.
17+
The translation to DuckDB, the typing and the recorded evidence behind them are SQLQuack's own.
1818
SQLQuack goes a different way from both projects on translation. It doesn't rewrite the tree and
1919
print it out. It checks each rule against recorded warehouse results and refuses what it can't
2020
prove.

0 commit comments

Comments
 (0)