Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
431 commits
Select commit Hold shift + click to select a range
6910744
chore!: update py03 version (#5136)
benfdking May 29, 2025
a56deab
Chore!: bump sqlglotrs to 0.5.0
georgesittas May 29, 2025
305c09b
docs: update API docs, CHANGELOG.md for v26.23.0 [skip ci]
georgesittas May 29, 2025
a3fccd9
fix(snowflake): generate SELECT for UNNEST without JOIN or FROM (#5138)
geooo109 May 29, 2025
e164b96
Minor styling updates
georgesittas May 29, 2025
bb4f428
Feat: bubble up comments nested under a Bracket, fixes #5131
georgesittas May 29, 2025
993919d
fix(snowflake): Properly transpile ARRAY_AGG, IGNORE/RESPECT NULLS (#…
VaggelisD May 29, 2025
6e57619
fix(snowflake): Transpile ISOWEEK to WEEKISO (#5139)
VaggelisD May 29, 2025
c484ca3
Fix(bigquery)!: recognize ARRAY_CONCAT_AGG as an aggregate function (…
georgesittas May 29, 2025
9f318eb
feat(snowflake): Transpile BQ's `ARRAY(SELECT AS STRUCT ...)` (#5140)
VaggelisD May 30, 2025
823f83d
docs: update API docs, CHANGELOG.md for v26.24.0 [skip ci]
georgesittas May 30, 2025
f3aeb37
Fix(tsql): properly parse and generate ALTER SET (#5143)
georgesittas May 30, 2025
72ce404
Fix!: Refactor ALTER TABLE ADD parsing (#5144)
VaggelisD May 30, 2025
e73ddb7
Fix(mysql)!: preserve TIMESTAMP on roundtrip (#5145)
georgesittas May 30, 2025
5752a87
chore: udpate benchmarking framework (#5146)
benfdking May 31, 2025
4f8c73d
Fix(hive): STRUCT column names and data type should be separated by '…
tsamaras May 31, 2025
93b402a
feat(parser): support SELECT, FROM, WHERE with pipe syntax (#5128)
geooo109 Jun 2, 2025
e2a488f
fix: Error on columns mismatch in pushdown_projections ignores dialec…
snovik75 Jun 2, 2025
0ae297a
Chore: compare performance on main vs pr branch (#5149)
georgesittas Jun 2, 2025
180963b
Chore: handle pipe syntax unsupported operators more gracefully
georgesittas Jun 2, 2025
6c8d61a
Chore: include optimization benchmarks (#5152)
georgesittas Jun 2, 2025
1a8e78b
feat(parser): ORDER BY with pipe syntax (#5153)
geooo109 Jun 2, 2025
e3f41bb
Trim changelog (#5156)
georgesittas Jun 2, 2025
966ad95
feat(tsql): add convert style 126 (#5157)
pa1ch Jun 2, 2025
896bcb5
Add T-SQL test that covers CONVERT code 126
georgesittas Jun 2, 2025
1a35365
Fix: avoid generating nested comments when not supported (#5158)
georgesittas Jun 2, 2025
b7ac6ff
feat(parser): LIMIT/OFFSET pipe syntax (#5159)
geooo109 Jun 2, 2025
f6124c6
Fix(rust-tokenizer)!: return token vector in `tokenize` even on failu…
georgesittas Jun 2, 2025
bc5c66c
Chore: Run benchmark job if /benchmark comment (#5164)
VaggelisD Jun 3, 2025
742b2b7
Chore: Fix benchmark CI to include issue number (#5166)
VaggelisD Jun 3, 2025
cfc158d
feat(snowflake): transpile STRTOK_TO_ARRAY to duckdb (#5165)
geooo109 Jun 3, 2025
ff0f30b
feat: support ARRAY_REMOVE (#5163)
geooo109 Jun 3, 2025
9cac01f
feat(tsql): support FOR XML syntax (#5167)
geooo109 Jun 3, 2025
86c6b90
refactor(tsql): XML_OPTIONS
geooo109 Jun 3, 2025
760a606
fix(postgres): support decimal values in INTERVAL expressions fixes #…
georgesittas Jun 3, 2025
64c37f1
Chore!: bump sqlglotrs to 0.6.0
georgesittas Jun 3, 2025
fd8c088
docs: update API docs, CHANGELOG.md for v26.25.0 [skip ci]
georgesittas Jun 3, 2025
440590b
Chore: bump sqlglotrs to 0.6.1
georgesittas Jun 4, 2025
ddcd59b
docs: update API docs, CHANGELOG.md for v26.25.1 [skip ci]
georgesittas Jun 4, 2025
8b5129f
Feat(postgres): improve pretty-formatting of ARRAY[...]
georgesittas Jun 4, 2025
f94e0b7
docs: update API docs, CHANGELOG.md for v26.25.2 [skip ci]
georgesittas Jun 4, 2025
964b4a1
Feat: add line/col position for Star
georgesittas Jun 4, 2025
546baed
docs: update API docs, CHANGELOG.md for v26.25.3 [skip ci]
georgesittas Jun 4, 2025
434c45b
Feat!: improve support for ENDSWITH closes #5170
georgesittas Jun 5, 2025
63f9cb4
Feat(sqlglotrs): match the Python implementation of __repr__ for toke…
georgesittas Jun 5, 2025
c007afa
Feat: support Star instance as first arg of exp.column helper (#5177)
georgesittas Jun 5, 2025
83de4e1
Chore: improve benchmark result displaying (#5176)
georgesittas Jun 5, 2025
bc001ce
feat(postgres)!: Add support for ANY_VALUE for versions 16+ (#5179)
VaggelisD Jun 6, 2025
6a2cb39
fix(parser)!: virtual column with AS(expr) as ComputedColumnConstrain…
geooo109 Jun 6, 2025
ba05ff6
feat(parser): AGGREGATE with GROUP AND ORDER BY pipe syntax (#5171)
geooo109 Jun 6, 2025
c78d475
used by dlt (#5181)
zilto Jun 6, 2025
26077a4
Feat: make to_table more lenient (#5183)
georgesittas Jun 6, 2025
c87ae02
fix(sqlite): Add REPLACE to command tokens (#5192)
VaggelisD Jun 9, 2025
29e2f1d
feat!: Array_intersection transpilation support (#5186)
HarishRavi96 Jun 9, 2025
d86a114
feat(sqlite): implement RESPECT/IGNORE NULLS in first_value() (#5185)
NickCrews Jun 9, 2025
5d5dc2f
chore: Clean up exp.ArrayIntersect PR (#5193)
VaggelisD Jun 9, 2025
4b89afd
fix(starrocks): array_agg_transpilation_fix (#5190)
Swathiraj23 Jun 9, 2025
1d50fca
Feat: improve transpilation of st_point and st_distance (#5194)
georgesittas Jun 9, 2025
461b054
Fix(postgres): support use_spheroid argument in ST_DISTANCE
georgesittas Jun 9, 2025
756ec3b
feat(parser): SET OPERATORS with pipe syntax (#5184)
geooo109 Jun 9, 2025
696150d
docs: update API docs, CHANGELOG.md for v26.26.0 [skip ci]
georgesittas Jun 9, 2025
99bbae3
Fix(sqlite): allow ALTER RENAME without COLUMN keyword fixes #5195
georgesittas Jun 10, 2025
ac6555b
Fix(hive)!: preserve DIV binary operator, fixes #5198 (#5199)
georgesittas Jun 10, 2025
d0eeb26
fix: eliminate_join_marks has multiple issues fixes #5188 (#5189)
snovik75 Jun 10, 2025
ad8a4e7
Chore: refactor join mark elimination to use is_correlated_subquery
georgesittas Jun 10, 2025
dfdd84b
fix(parser)!: CTEs instead of subqueries for pipe syntax (#5205)
geooo109 Jun 11, 2025
c20f85e
Feat(spark): support ALTER ADD PARTITION (#5208)
georgesittas Jun 11, 2025
77e9d9a
Fix(mysql): properly parse STORED/VIRTUAL computed columns (#5210)
georgesittas Jun 11, 2025
5f95299
Fix(parser)!: support multi-part (>3) dotted functions (#5211)
georgesittas Jun 11, 2025
02afa2a
fix(postgres)!: Preserve quoting for UDT (#5216)
VaggelisD Jun 12, 2025
f37c0b1
Fix(snowflake): ensure a standalone GET() expression can be parsed (#…
georgesittas Jun 12, 2025
c4debc0
docs: update API docs, CHANGELOG.md for v26.27.0 [skip ci]
georgesittas Jun 12, 2025
9dbcf7a
Dummy commit
georgesittas Jun 12, 2025
ca0edce
docs: update API docs, CHANGELOG.md for v26.28.0 [skip ci]
georgesittas Jun 12, 2025
44297f1
feat(parser)!: JOIN pipe syntax, Set Operators as CTEs (#5215)
geooo109 Jun 13, 2025
28fed58
Fix(optimizer): UnboundLocalError in scope module
georgesittas Jun 13, 2025
aac70aa
refactor(parser): simpler _parse_pipe_syntax_select
geooo109 Jun 13, 2025
21cd3eb
feat(parser): PIVOT/UNPIVOT pipe syntax (#5222)
geooo109 Jun 13, 2025
809e05a
Fix(snowflake): preserve STRTOK_TO_ARRAY roundtrip
georgesittas Jun 13, 2025
1dab9e2
docs: update API docs, CHANGELOG.md for v26.28.1 [skip ci]
georgesittas Jun 13, 2025
97f5822
feat(parser): AS pipe syntax (#5224)
geooo109 Jun 13, 2025
a7e7fee
feat(parser): EXTEND pipe syntax (#5225)
geooo109 Jun 13, 2025
c1cb9f8
Feat(snowflake): add autoincrement order clause support (#5223)
dmaresma Jun 16, 2025
df73a79
fix(tsql): Retain limit clause in subquery expression. (#5227)
MarcusRisanger Jun 16, 2025
7d966e6
Clean up ORDER/NOORDER snowflake clause
georgesittas Jun 16, 2025
4f42d95
fix(duckdb)!: Normalize date parts in `exp.Extract` generation (#5229)
VaggelisD Jun 16, 2025
91afe4c
feat(parser): TABLESAMPLE pipe syntax (#5231)
geooo109 Jun 16, 2025
1b4c083
Fix(athena): include Hive string escapes in the tokenizer (#5233)
georgesittas Jun 16, 2025
e7e38fe
Fix(optimizer)!: resolve table "columns" in bigquery that produce str…
georgesittas Jun 16, 2025
781539d
Fix(duckdb): Generate correct DETACH syntax if IF EXISTS is set (#5235)
erindru Jun 17, 2025
62da84a
Feat(snowflake): improve transpilation of unnested object lookup (#5234)
georgesittas Jun 17, 2025
2c60453
feat(parser): DROP pipe syntax (#5226)
geooo109 Jun 17, 2025
9885729
feat(parser): SET pipe syntax (#5236)
geooo109 Jun 17, 2025
7dfb578
Chore: Refactor DETACH generation (#5237)
VaggelisD Jun 17, 2025
ac03639
docs: update API docs, CHANGELOG.md for v26.29.0 [skip ci]
georgesittas Jun 17, 2025
d3dc761
Fix!: change comma to cross join when precedence is the same for all …
georgesittas Jun 18, 2025
e7c217e
feat(oracle)!: transpile from/to dbms_random.value (#5242)
georgesittas Jun 19, 2025
0d19544
feat: add Microsoft Fabric dialect, a case sensitive version of TSQL …
mattiasthalen Jun 19, 2025
249dbc9
feat(parser): start with SELECT and nested pipe syntax (#5248)
geooo109 Jun 20, 2025
f5b5b93
feat(fabric): implement type mappings for unsupported Fabric types (#…
mattiasthalen Jun 20, 2025
78fcea1
feat(spark, databricks): parse brackets as placeholder (#5256)
geooo109 Jun 20, 2025
31814cd
Fix(presto)!: cast constructed timestamp literal to zone-aware type i…
georgesittas Jun 21, 2025
7d71387
feat(fabric): Add precision cap to temporal data types (#5250)
mattiasthalen Jun 21, 2025
e8cf793
feat(duckdb): Transpile Snowflake's TO_CHAR if format is in Snowflake…
VaggelisD Jun 21, 2025
df6fc87
docs: update API docs, CHANGELOG.md for v26.30.0 [skip ci]
georgesittas Jun 21, 2025
847248d
Fix: format ADD CONSTRAINT clause properly fixes #5260
georgesittas Jun 23, 2025
db4e0ec
fix(tsql)!: convert information schema keywords to uppercase for cons…
mattiasthalen Jun 23, 2025
0cdfe64
feat: add Exasol dialect (pass 1: string type mapping) (#5264)
nnamdi16 Jun 23, 2025
784713a
Clean up Exasol 1st pass
georgesittas Jun 23, 2025
e76bba2
Update dialect count
georgesittas Jun 23, 2025
08252c2
Clean up Fabric tests
georgesittas Jun 23, 2025
8de87e3
fix(redshift): handle scale parameter in to_timestamp (#5266)
MatiasCasaliSplit Jun 23, 2025
eea1570
Feat(tsql)!: add support for SYSDATETIMEOFFSET closes #5272 (#5273)
georgesittas Jun 24, 2025
3d3ccc5
feat(hive)!: Transpile exp.PosExplode pos column alias (#5274)
VaggelisD Jun 24, 2025
e32f709
fix(hive): Fix exp.PosExplode alias order (#5279)
VaggelisD Jun 25, 2025
dbc5e9b
Revert "feat(duckdb): Transpile Snowflake's TO_CHAR if format is in S…
georgesittas Jun 25, 2025
3dd9f8e
fix(fabric): Type mismatches and precision error (#5280)
mattiasthalen Jun 25, 2025
1c48c09
feat(exasol): added datatype mappings and test for exasol dialect. (#…
nnamdi16 Jun 25, 2025
79d718e
Cleanup
georgesittas Jun 25, 2025
9a95af1
Fix(snowflake)!: only cast strings to timestamp for TO_CHAR (TimeToSt…
georgesittas Jun 25, 2025
883fcb1
feat(databricks): GROUP_CONCAT to LISTAGG (#5284)
geooo109 Jun 25, 2025
8af4790
fix(tsql)!: Fix parsing of ADD CONSTRAINT (#5288)
VaggelisD Jun 26, 2025
18aea08
Fix(scope)!: include bigquery unnest aliases in selected sources (#5285)
georgesittas Jun 26, 2025
21ef897
feat(fabric): implement UnixToTime transformation to DATEADD syntax (…
mattiasthalen Jun 26, 2025
57c0e5d
Clean up Fabric UnixToTime generation logic
georgesittas Jun 26, 2025
0ff95c5
Feat!: add parsing/transpilation support for the REPLACE function (#5…
rahulj51 Jun 26, 2025
aa5f806
Clean up REPLACE implementation
georgesittas Jun 26, 2025
ba4a234
fix(fabric): ignore Date cap (#5290)
fresioAS Jun 26, 2025
dc03649
Fix(bigquery)!: only coerce time var -like units into strings for DAT…
georgesittas Jun 26, 2025
1b0631c
feat(exasol): implemented the Mod function (#5292)
nnamdi16 Jun 26, 2025
7c63b56
docs: update API docs, CHANGELOG.md for v26.31.0 [skip ci]
georgesittas Jun 26, 2025
5724538
fix(bigquery)!: ARRAY_CONCAT type annotation (#5293)
geooo109 Jun 26, 2025
ba7bf39
feat(exasol): implemented BIT_AND function with test (#5294)
nnamdi16 Jun 26, 2025
fb4122e
feat(exasol): add bitwiseOr function to exasol dialect (#5297)
nnamdi16 Jun 27, 2025
c103b23
feat!: add support for `SUBSTRING_INDEX` (#5296)
ankur334 Jun 27, 2025
ca873a1
Fix test
georgesittas Jun 27, 2025
4752f3a
feat(exasol): added bit_xor built in exasol function to exasol dialec…
nnamdi16 Jun 27, 2025
09bd610
feat(parser): annotate type of ARRAY_CONCAT_AGG (#5299)
geooo109 Jun 27, 2025
ad0311a
feat(exasol): added bit_not exasol built in function. (#5300)
nnamdi16 Jun 27, 2025
a7bd823
feat(parser)!: annotate type of ARRAY_TO_STRING (#5301)
geooo109 Jun 27, 2025
2aa2182
feat(exasol): added BIT_LSHIFT built in function to exasol dialect (#…
nnamdi16 Jun 27, 2025
c3d9ef2
feat(exasol): added the bit_rshift built in exasol function (#5304)
nnamdi16 Jun 27, 2025
6b42353
feat(parser)!: annotate type of ARRAY_FIRST, ARRAY_LAST (#5303)
geooo109 Jun 27, 2025
f5b7cc6
feat(exasol): added `EVERY` built in function (#5305)
nnamdi16 Jun 30, 2025
d3f04d6
feat: add Dremio dialect (#5277)
mateuszpoleski Jun 30, 2025
f457b24
Get rid of function name normalization/preservation flags for Dremio
georgesittas Jun 30, 2025
3d8e478
feat(exasol): added edit_distance built in function to exasol dialect…
nnamdi16 Jun 30, 2025
db9b61e
feat(parser)!: parse, annotate type for ARRAY_REVERSE (#5306)
geooo109 Jun 30, 2025
5612a6d
feat!: add support for SPACE (#5308)
ankur334 Jun 30, 2025
ebd8450
Rename _space_sql to space_sql
georgesittas Jun 30, 2025
f148c9e
feat(duckdb): Transpile Spark's `exp.PosExplode` (#5311)
VaggelisD Jun 30, 2025
179a278
feat(exasol): added the regexp_replace function (#5313)
nnamdi16 Jun 30, 2025
8a2f65d
feat(parser)!: parse and annotate type for ARRAY_SLICE (#5312)
geooo109 Jun 30, 2025
8d118ea
Refactor(athena)!: route statements to hive/trino depending on their …
georgesittas Jun 30, 2025
d2f7c41
feat!: add TypeOf / toTypeName support (#5315)
ankur334 Jul 1, 2025
0a6afcd
Fix: use re-entrant lock in dialects/__init__ to avoid deadlocks (#5322)
georgesittas Jul 1, 2025
599ca81
fix(parser): avoid CTE values ALIAS gen, when ALIAS exists (#5323)
geooo109 Jul 1, 2025
cd5c171
Update dialect count
georgesittas Jul 1, 2025
296c15d
docs: update API docs, CHANGELOG.md for v26.33.0 [skip ci]
georgesittas Jul 1, 2025
5a0f589
fix(spark)!: distinguish STORED AS from USING (#5320)
geooo109 Jul 1, 2025
cbc79c2
Fix: preserve ORDER BY comments fixes #5326
georgesittas Jul 2, 2025
fa69583
fix(optimizer): avoid qualifying CTE (#5327)
geooo109 Jul 2, 2025
950c15d
feat(exasol): add var_pop built in function to exasol dialect (#5328)
nnamdi16 Jul 2, 2025
c4ca182
feat(optimizer)!: annotate type for FROM_BASE64 (#5329)
geooo109 Jul 2, 2025
0992e99
feat(exasol): Add support APPROXIMATE_COUNT_DISTINCT functions in ex…
nnamdi16 Jul 2, 2025
7b72bbe
feat(optimizer)!: annotate type for ANY_VALUE (#5331)
geooo109 Jul 2, 2025
c0d57e7
feat(optimizer)!: annotate type for CHR (#5332)
geooo109 Jul 2, 2025
d65b5c2
feat(optimizer)!: annotate type for COUNTIF (#5334)
geooo109 Jul 2, 2025
521b705
feat(optimizer)!: annotate type for GENERATE_ARRAY (#5335)
geooo109 Jul 2, 2025
5fb26c5
feat(optimizer)!: annotate type for INT64 (#5339)
geooo109 Jul 3, 2025
cff9b55
feat(optimizer)!: annotate type for LOGICAL_AND and LOGICAL_OR (#5340)
geooo109 Jul 3, 2025
b94a6f9
feat(optimizer)!: annotate type for MAKE_INTERVAL (#5341)
geooo109 Jul 3, 2025
2c9a7c6
feat(optimizer)!: annotate type for LAST_VALUE (#5336)
geooo109 Jul 3, 2025
29cce43
fix: comment lost before GROUP, JOIN and HAVING (#5338)
chiiips Jul 3, 2025
d862a28
feat(optimizer)!: annoate type for TO_BASE64 (#5342)
geooo109 Jul 3, 2025
85888c1
feat(optimizer)!: annotate type for UNIX_DATE (#5343)
geooo109 Jul 3, 2025
8a214e0
feat(optimizer)!: annotate type for UNIX_SECONDS (#5344)
geooo109 Jul 3, 2025
625cb74
feat(optimizer)!: annotate type for STARTS_WITH (#5345)
geooo109 Jul 3, 2025
0337c4d
feat(optimizer)!: annotate type for SHA and SHA2 (#5346)
geooo109 Jul 3, 2025
cc389fa
chore(optimizer)!: annotate type SHA1, SHA256, SHA512 for BigQuery (#…
geooo109 Jul 3, 2025
835d9e6
Feat: add case-insensitive uppercase normalization strategy (#5349)
georgesittas Jul 4, 2025
f80493e
feat(exasol): Add TO_CHAR function support in exasol dialect (#5350)
nnamdi16 Jul 4, 2025
194850a
Chore(exasol): clean up TO_CHAR
georgesittas Jul 4, 2025
509b741
Fix!: preserve multi-arg DECODE function instead of converting to CAS…
georgesittas Jul 4, 2025
cea6a24
Feat(teradata): add FORMAT phrase parsing (#5348)
readjfb Jul 5, 2025
eeddeae
Clean up Teradata FORMAT phrase logic
georgesittas Jul 5, 2025
eae64e1
Feat(duckdb): support new lambda syntax (#5359)
georgesittas Jul 7, 2025
e77991d
feat(duckdb): Add support for SET VARIABLE (#5360)
VaggelisD Jul 7, 2025
188d446
fix(optimizer): downstream column for PIVOT (#5363)
geooo109 Jul 7, 2025
c1d3d61
feat(optimizer)!: annotate type for CORR (#5364)
geooo109 Jul 7, 2025
c1e8677
feat(optimizer)!: annotate type for COVAR_POP (#5365)
geooo109 Jul 7, 2025
e110ef4
feat(optimizer)!: annotate type for COVAR_SAMP (#5367)
geooo109 Jul 7, 2025
5b59c16
feat(optimizer)!: annotate type for DATETIME (#5369)
geooo109 Jul 7, 2025
47176ce
feat(optimizer)!: annotate type for ENDS_WITH (#5370)
geooo109 Jul 7, 2025
1fd757e
feat(fabric): Ensure TIMESTAMPTZ is used with AT TIME ZONE (#5362)
mattiasthalen Jul 7, 2025
800a82c
Cleanup fabric tests
georgesittas Jul 7, 2025
2cce53d
feat(optimizer)!: annotate type for LAG (#5371)
geooo109 Jul 7, 2025
a3227de
Feat!: improve transpilation of `ROUND(x, y)` to Postgres (#5368)
blecourt-private Jul 7, 2025
e705e8e
Clean up Postgres ROUND logic
georgesittas Jul 7, 2025
1abd461
Chore: bump min. supported version to python 3.9 (#5353)
georgesittas Jul 7, 2025
debd616
docs: update API docs, CHANGELOG.md for v27.0.0 [skip ci]
georgesittas Jul 7, 2025
d7ccb48
fix(duckdb)!: week/quarter support (#5374)
eakmanrq Jul 8, 2025
b368fba
feat(optimizer)!: parse and annotate type for ASCII (#5377)
geooo109 Jul 8, 2025
71b1349
chore(postgres, hive): use ASCII node instead of UNICODE node (#5380)
geooo109 Jul 8, 2025
7f19b31
feat(optimizer)!: annotate type for UNICODE (#5381)
geooo109 Jul 8, 2025
f035bf0
feat(dremio): Add TIME_MAPPING for Dremio dialect (#5378)
mateuszpoleski Jul 8, 2025
a5c2245
Chore: improve error msg for PIVOT with missing aggregation
georgesittas Jul 9, 2025
252469d
fix(snowflake): transpile bigquery CURRENT_DATE with timezone (#5387)
geooo109 Jul 10, 2025
7511853
fix(postgres): add XML type (#5396)
geooo109 Jul 14, 2025
9e8d3ab
Fix(optimizer)!: Preserve struct-column parentheses for RisingWave di…
MisterWheatley Jul 15, 2025
8f43c5f
Some struct expansion cleanups
georgesittas Jul 15, 2025
31cfd0f
feat(exasol): add to_date and refactored to_char functions with respe…
nnamdi16 Jul 15, 2025
3223e63
Fix(fabric)!: cast datetimeoffset to datetime2 (#5385)
mattiasthalen Jul 15, 2025
12b49dd
fix: remove equal sign from CREATE TABLE comment (doris, starrocks) (…
xinge-ji Jul 15, 2025
6709fb9
Add tests for naked table COMMENT property (doris/starrocks)
georgesittas Jul 15, 2025
bd3776e
feat(doris): add PROPERTIES_LOCATION mapping for Doris dialect (#5391)
xinge-ji Jul 15, 2025
7eaa67a
Feat(doris): properly supported PROPERTIES and UNIQUE KEY table prop
georgesittas Jul 15, 2025
1e78163
feat(duckdb): support column access via index (#5395)
geooo109 Jul 15, 2025
06cea31
fix(postgres)!: support KEY related locks (#5397)
geooo109 Jul 15, 2025
1014a67
feat!: remove redundant todate in dayofweek closes #5398 (#5399)
tobymao Jul 15, 2025
92d93a6
Fix(parser): do not consume modifier prefixes in group parser, fixes …
georgesittas Jul 15, 2025
be52f78
feat(exasol): add support for CONVERT_TZ function (#5401)
nnamdi16 Jul 15, 2025
d637161
feat(exasol): add mapping to TIME_TO_STR in exasol dialect (#5403)
nnamdi16 Jul 15, 2025
b2631ae
feat(optimizer)!: annotate type for bigquery BIT_AND, BIT_OR, BIT_XOR…
geooo109 Jul 15, 2025
b81ae62
feat(exasol): map STR_TO_TIME to TO_DATE and (#5407)
nnamdi16 Jul 15, 2025
c2fb9ab
feat: add `DateStrToTime` (#5409)
betodealmeida Jul 15, 2025
ba0c801
fix(tsql): change READ_ONLY to READONLY (#5410)
CrispinStichartFNSB Jul 15, 2025
a95993a
Feat(snowflake): improve transpilation of queries with UNNEST sources…
georgesittas Jul 16, 2025
7b69f54
feat(snowflake): Support SEMANTIC_VIEW (#5414)
VaggelisD Jul 16, 2025
7dba6f6
feat(exasol): map AT TIME ZONE to CONVERT_TZ (#5416)
nnamdi16 Jul 16, 2025
63da895
fix(risingwave): Fix RisingWave dialect SQL for MAP datatype declarat…
MisterWheatley Jul 16, 2025
25f2c1b
feat(postgres): query placeholders (#5415)
geooo109 Jul 16, 2025
c309c87
feat(doris): support range partitioning (#5402)
xinge-ji Jul 16, 2025
2230107
Revert "feat(doris): support range partitioning (#5402)" (#5420)
georgesittas Jul 16, 2025
edacae1
fix(snowflake): transpile bigquery GENERATE_DATE_ARRAY with column ac…
geooo109 Jul 16, 2025
394d3a8
feat(dremio): Add support for DATE_ADD and DATE_SUB (#5411)
mateuszpoleski Jul 17, 2025
9cfac4f
feat(doris): enhance partitioning support (#5421)
xinge-ji Jul 17, 2025
18c45a2
Clean up Doris partition PR
georgesittas Jul 17, 2025
a018bea
feat(exasol): mapped exp.CurrentUser to exasol CURRENT_USER (#5422)
nnamdi16 Jul 17, 2025
5835b8d
fix(duckdb)!: make bracket parsing aware of duckdb MAP func (#5423)
geooo109 Jul 17, 2025
489dc5c
feat(optimizer)!: parse and annotate type support for JSON_ARRAY (#5424)
geooo109 Jul 17, 2025
0ed518c
feat(optimizer)!: annotate type for bigquery JSON_VALUE (#5427)
geooo109 Jul 18, 2025
6091617
feat(optimizer)!: annotate type for bigquery JSON_VALUE_ARRAY (#5428)
geooo109 Jul 18, 2025
631c851
feat(optimizer)!: parse and annotate type support for bigquery JSON_T…
geooo109 Jul 18, 2025
e73bb4d
Fixup
georgesittas Jul 18, 2025
5c59816
fix(snowflake): ALTER TABLE ADD with multiple columns (#5431)
geooo109 Jul 18, 2025
6a465be
docs: update API docs, CHANGELOG.md for v27.1.0 [skip ci]
georgesittas Jul 18, 2025
732548f
feat(postgresql): add support for table creation DDL that contains a …
amosbiras Jul 21, 2025
59fd875
Chore: Refactor PRIMARY KEY ... INCLUDE handling (#5433)
VaggelisD Jul 21, 2025
9f860a0
fix(snowflake): ALTER TABLE ADD with IF NOT EXISTS (#5438)
geooo109 Jul 21, 2025
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
81 changes: 81 additions & 0 deletions .github/scripts/format_benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env python3
"""Format benchmark comparison output with visual indicators for GitHub markdown."""

import re
import sys


def format_benchmark_output(content):
"""Add visual formatting to benchmark comparison output."""
lines = content.split("\n")
formatted_lines = []

for line in lines:
# Skip empty lines and headers
if not line.strip() or line.startswith("|") and "---" in line:
formatted_lines.append(line)
continue

# Process benchmark result lines
if "|" in line and ("faster" in line or "slower" in line):
# Extract the speed factor (e.g., "1.23x faster" or "1.10x slower")
speed_match = re.search(r"(\d+\.\d+)x\s+(faster|slower)", line)
if speed_match:
factor = float(speed_match.group(1))
direction = speed_match.group(2)

# Add visual indicators based on performance
if direction == "faster":
# Green indicator for faster
if factor >= 2.0:
indicator = "🟢🟢" # Double green for 2x+ faster
elif factor >= 1.1:
indicator = "🟢" # Single green for 1.1x+ faster
else:
indicator = "⚪" # White for marginal improvement
formatted_text = f"{indicator} **{speed_match.group(0)}**"
else:
# Red indicator for slower
if factor >= 2.0:
indicator = "🔴🔴" # Double red for 2x+ slower
elif factor >= 1.1:
indicator = "🔴" # Single red for 1.1x+ slower
else:
indicator = "⚪" # White for marginal slowdown
formatted_text = f"{indicator} **{speed_match.group(0)}**"

# Replace the original text with formatted version
line = line.replace(speed_match.group(0), formatted_text)
elif "not significant" in line:
# Add neutral indicator for non-significant changes
line = re.sub(r"not significant", "⚪ not significant", line)

formatted_lines.append(line)

return "\n".join(formatted_lines)


def main():
if len(sys.argv) != 2:
print("Usage: python format_benchmark.py <input_file>")
sys.exit(1)

input_file = sys.argv[1]

try:
with open(input_file, "r") as f:
content = f.read()

formatted = format_benchmark_output(content)
print(formatted)

except FileNotFoundError:
print(f"Error: File '{input_file}' not found")
sys.exit(1)
except Exception as e:
print(f"Error: {e}")
sys.exit(1)


if __name__ == "__main__":
main()
91 changes: 91 additions & 0 deletions .github/workflows/benchmark-sqlglot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Benchmark pull requests

on:
issue_comment:
types: [created, edited, deleted]
pull_request:
types: [opened, synchronize, reopened]

jobs:
run-benchmark:
name: run benchmark
runs-on: ubuntu-latest
if: |
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '/benchmark') &&
github.event.issue.pull_request) ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.body, '/benchmark'))
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed to fetch main branch too
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Create a virtual environment
run: |
python -m venv .venv
source ./.venv/bin/activate
python -m pip install --upgrade pip
pip install pyperf
- name: Run benchmark on PR branch
run: |
source ./.venv/bin/activate
make install-dev
make install-dev-rs-release
python benchmarks/parse.py --quiet --output bench_parse_pr.json
python benchmarks/optimize.py --quiet --fast --output bench_optimize_pr.json
- name: Checkout main branch into subdir
run: |
git fetch origin main
git worktree add main-branch origin/main
- name: Reset virtual environment
run: |
rm -rf .venv
python -m venv .venv
source ./.venv/bin/activate
python -m pip install --upgrade pip
pip install pyperf
- name: Run benchmark on main branch
run: |
source ./.venv/bin/activate
cd main-branch
make install-dev
make install-dev-rs-release
python benchmarks/parse.py --quiet --output ../bench_parse_main.json
python benchmarks/optimize.py --quiet --fast --output ../bench_optimize_main.json
cd ..
- name: Compare benchmarks and save results
run: |
source ./.venv/bin/activate
python -m pyperf compare_to bench_parse_main.json bench_parse_pr.json --table --table-format=md > bench_parse_comparison_raw.txt
python -m pyperf compare_to bench_optimize_main.json bench_optimize_pr.json --table --table-format=md > bench_optimize_comparison_raw.txt

# Format with colors
python .github/scripts/format_benchmark.py bench_parse_comparison_raw.txt > bench_parse_comparison.txt
python .github/scripts/format_benchmark.py bench_optimize_comparison_raw.txt > bench_optimize_comparison.txt
- name: Combine benchmark outputs
run: |
echo "## Benchmark Results" > combined_benchmarks.md
echo "" >> combined_benchmarks.md
echo "**Legend:**" >> combined_benchmarks.md
echo "- 🟢🟢 = 2x+ faster" >> combined_benchmarks.md
echo "- 🟢 = 1.1x - 2x faster" >> combined_benchmarks.md
echo "- ⚪ = No significant change (< 1.1x)" >> combined_benchmarks.md
echo "- 🔴 = 1.1x - 2x slower" >> combined_benchmarks.md
echo "- 🔴🔴 = 2x+ slower" >> combined_benchmarks.md
echo "" >> combined_benchmarks.md
echo "### Parsing Benchmark" >> combined_benchmarks.md
cat bench_parse_comparison.txt >> combined_benchmarks.md
echo -e "\n---\n" >> combined_benchmarks.md
echo "### Optimization Benchmark" >> combined_benchmarks.md
cat bench_optimize_comparison.txt >> combined_benchmarks.md
- name: Comment on PR for parse benchmark results
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
body-file: combined_benchmarks.md
Comment on lines +11 to +91

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 months ago

To fix the problem, you should add a permissions block to the workflow or to the specific job. The block should specify only the permissions required for the workflow to operate correctly. In this workflow, the main requirement is the ability to read repository contents (contents: read) and to write comments on issues or pull requests (issues: write and/or pull-requests: write). Since the workflow comments on PRs using the peter-evans/create-or-update-comment action, it needs at least issues: write (for issue comments) and pull-requests: write (for PR comments). To ensure least privilege, add the following block at the job level (under run-benchmark:):

permissions:
  contents: read
  issues: write
  pull-requests: write

This should be added just beneath the job name (after line 11) in .github/workflows/benchmark-sqlglot.yml.


Suggested changeset 1
.github/workflows/benchmark-sqlglot.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/benchmark-sqlglot.yml b/.github/workflows/benchmark-sqlglot.yml
--- a/.github/workflows/benchmark-sqlglot.yml
+++ b/.github/workflows/benchmark-sqlglot.yml
@@ -9,6 +9,10 @@
 jobs:
   run-benchmark:
     name: run benchmark
+    permissions:
+      contents: read
+      issues: write
+      pull-requests: write
     runs-on: ubuntu-latest
     if: |
       (github.event_name == 'issue_comment' && 
EOF
@@ -9,6 +9,10 @@
jobs:
run-benchmark:
name: run benchmark
permissions:
contents: read
issues: write
pull-requests: write
runs-on: ubuntu-latest
if: |
(github.event_name == 'issue_comment' &&
Copilot is powered by AI and may make mistakes. Always verify output.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Benchmark Rust tokenizer changes

on:
pull_request:
paths:
- 'sqlglotrs/**'
name: benchmark pull requests

jobs:
run-benchmark:
name: run benchmark
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Python Release to PyPI
name: Publish sqlglot and sqlglotrs to PyPI

on:
push:
Expand Down Expand Up @@ -55,13 +55,13 @@ jobs:
- uses: actions/setup-python@v5
if: matrix.os == 'windows'
with:
python-version: '3.7'
python-version: '3.9'
architecture: ${{ matrix.python-architecture || 'x64' }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter 3.7 3.8 3.9 3.10 3.11 3.12 3.13
args: --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13
sccache: 'true'
manylinux: auto
working-directory: ./sqlglotrs
Expand Down Expand Up @@ -122,15 +122,15 @@ jobs:
python -m venv .venv
source ./.venv/bin/activate
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
make install-dev
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
source ./.venv/bin/activate
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
- name: Update API docs
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
name: Test and Lint Python Package
name: Run tests and linter checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
run-checks:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Create a virtual environment
run: |
python -m venv .venv
Expand All @@ -25,11 +27,7 @@ jobs:
source ./.venv/bin/activate
python -m pip install --upgrade pip
make install-dev
- name: Run checks (linter, code style, tests)
- name: Run tests and linter checks
run: |
source ./.venv/bin/activate
if [[ ${{ matrix.python-version }} == "3.7" ]]; then
make test test-rs
else
make check
fi
make check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ celerybeat.pid
.venv
env/
venv/
venv*/
ENV/
env.bak/
venv.bak/
Expand Down
Loading
Loading