Repository navigation
Commit 271b10f
committed
core: express what a dialect does to a type as data rather than registered code
The per-dialect Go hooks are gone. dialect.json now carries rewrites — an
ordered list of pattern, template and bound, such as float($1) to real
where $1 <= 24 or Decimal32($1) to Decimal(9, $1) — which the seed loads
into sql_type_rewrite and the catalog applies before interning; the words
and argument positions that are identifiers rather than types, kept as
dialect flags; and SQLite's affinity rule, loaded into sql_type_affinity.
A result that depends on an argument's value is a return template in
functions.jsonl, kept on sql_proc and filled in from the call's literals.
ClickHouse numbers an Enum's members and sorts a Variant's in its
converter, where spelling a type belongs, and goldeneye writes an array
column of the PostgreSQL system catalogs as its element with the array
flag rather than pg_type's _text, which the legacy path now sees too.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qryf7a1doPFuCz2eGT3bCr1 parent 85b92aa commit 271b10f
30 files changed
Lines changed: 1145 additions & 667 deletions
File tree
- internal
- core
- analyzer
- catalogdb
- catalogdef
- seed
- endtoend/testdata/codegen_json/gen
- engine
- clickhouse
- dialect
- dolphin
- dialect
- duckdb
- dialect
- googlesql
- dialect
- mssql
- dialect
- postgresql
- dialect
- sqlite
- dialect
- goldeneye/postgresql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
833 | | - | |
834 | | - | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
854 | 866 | | |
855 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
856 | 882 | | |
857 | | - | |
| 883 | + | |
858 | 884 | | |
859 | 885 | | |
860 | 886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
42 | | - | |
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
109 | 125 | | |
110 | 126 | | |
111 | 127 | | |
| |||
213 | 229 | | |
214 | 230 | | |
215 | 231 | | |
216 | | - | |
217 | | - | |
| 232 | + | |
| 233 | + | |
218 | 234 | | |
219 | 235 | | |
220 | 236 | | |
| |||
226 | 242 | | |
227 | 243 | | |
228 | 244 | | |
229 | | - | |
| 245 | + | |
230 | 246 | | |
231 | 247 | | |
232 | 248 | | |
233 | 249 | | |
234 | | - | |
| 250 | + | |
235 | 251 | | |
236 | 252 | | |
237 | 253 | | |
| |||
0 commit comments