Skip to content

Commit

Permalink
Merge pull request #339 from bruin-data/patch/fix-sql-parsing-for-nes…
Browse files Browse the repository at this point in the history
…ted-bq-queries

Patch/fix sql parsing for nested bq queries
  • Loading branch information
karakanb authored Dec 23, 2024
2 parents 3cd133c + 3b7523c commit 47592ff
Show file tree
Hide file tree
Showing 223 changed files with 8,204 additions and 2,776 deletions.
97 changes: 46 additions & 51 deletions internal/data/darwin-amd64/files.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
{
"contentHash": "9ac2f4d19eb7d350a8eb024570819c0647f4fb9243db6d1d8bf1362e2f67421f",
"contentHash": "95b0779ce77019c75f2afd8f31d589060691e75627705b6336eed9f0df755454",
"files": [
{
"name": "sqlglot",
"size": 0,
"perm": 2147484141
},
{
"name": "sqlglot-25.30.0.dist-info",
"name": "sqlglot-26.0.1.dist-info",
"size": 0,
"perm": 2147484141
},
{
"name": "sqlglot-25.30.0.dist-info/INSTALLER",
"name": "sqlglot-26.0.1.dist-info/INSTALLER",
"size": 4,
"perm": 420
},
{
"name": "sqlglot-25.30.0.dist-info/LICENSE",
"name": "sqlglot-26.0.1.dist-info/LICENSE",
"size": 1065,
"perm": 420
},
{
"name": "sqlglot-25.30.0.dist-info/METADATA",
"size": 19436,
"name": "sqlglot-26.0.1.dist-info/METADATA",
"size": 19434,
"perm": 420
},
{
"name": "sqlglot-25.30.0.dist-info/RECORD",
"size": 10646,
"name": "sqlglot-26.0.1.dist-info/RECORD",
"size": 10641,
"perm": 420
},
{
"name": "sqlglot-25.30.0.dist-info/REQUESTED",
"name": "sqlglot-26.0.1.dist-info/REQUESTED",
"size": 0,
"perm": 420
},
{
"name": "sqlglot-25.30.0.dist-info/WHEEL",
"name": "sqlglot-26.0.1.dist-info/WHEEL",
"size": 92,
"perm": 420
},
{
"name": "sqlglot-25.30.0.dist-info/top_level.txt",
"name": "sqlglot-26.0.1.dist-info/top_level.txt",
"size": 8,
"perm": 420
},
Expand All @@ -63,7 +63,7 @@
},
{
"name": "sqlglot/_version.py",
"size": 415,
"size": 413,
"perm": 420
},
{
Expand All @@ -83,12 +83,12 @@
},
{
"name": "sqlglot/dialects/bigquery.py",
"size": 44250,
"size": 48039,
"perm": 420
},
{
"name": "sqlglot/dialects/clickhouse.py",
"size": 49951,
"size": 50917,
"perm": 420
},
{
Expand All @@ -98,7 +98,7 @@
},
{
"name": "sqlglot/dialects/dialect.py",
"size": 61703,
"size": 62463,
"perm": 420
},
{
Expand All @@ -108,12 +108,12 @@
},
{
"name": "sqlglot/dialects/drill.py",
"size": 5792,
"size": 5827,
"perm": 420
},
{
"name": "sqlglot/dialects/duckdb.py",
"size": 40322,
"size": 42066,
"perm": 420
},
{
Expand All @@ -128,22 +128,22 @@
},
{
"name": "sqlglot/dialects/mysql.py",
"size": 46141,
"size": 46605,
"perm": 420
},
{
"name": "sqlglot/dialects/oracle.py",
"size": 17508,
"size": 16048,
"perm": 420
},
{
"name": "sqlglot/dialects/postgres.py",
"size": 27561,
"size": 28521,
"perm": 420
},
{
"name": "sqlglot/dialects/presto.py",
"size": 29010,
"size": 29302,
"perm": 420
},
{
Expand All @@ -158,12 +158,12 @@
},
{
"name": "sqlglot/dialects/risingwave.py",
"size": 158,
"size": 2684,
"perm": 420
},
{
"name": "sqlglot/dialects/snowflake.py",
"size": 47537,
"size": 50657,
"perm": 420
},
{
Expand All @@ -173,7 +173,7 @@
},
{
"name": "sqlglot/dialects/spark2.py",
"size": 14177,
"size": 14333,
"perm": 420
},
{
Expand All @@ -183,7 +183,7 @@
},
{
"name": "sqlglot/dialects/starrocks.py",
"size": 5333,
"size": 10598,
"perm": 420
},
{
Expand All @@ -203,7 +203,7 @@
},
{
"name": "sqlglot/dialects/tsql.py",
"size": 47873,
"size": 48114,
"perm": 420
},
{
Expand Down Expand Up @@ -248,27 +248,27 @@
},
{
"name": "sqlglot/expressions.py",
"size": 230934,
"size": 233815,
"perm": 420
},
{
"name": "sqlglot/generator.py",
"size": 190591,
"size": 195941,
"perm": 420
},
{
"name": "sqlglot/helper.py",
"size": 13641,
"size": 14031,
"perm": 420
},
{
"name": "sqlglot/jsonpath.py",
"size": 6746,
"size": 7664,
"perm": 420
},
{
"name": "sqlglot/lineage.py",
"size": 12412,
"size": 15303,
"perm": 420
},
{
Expand All @@ -288,7 +288,7 @@
},
{
"name": "sqlglot/optimizer/canonicalize.py",
"size": 6295,
"size": 7622,
"perm": 420
},
{
Expand Down Expand Up @@ -353,7 +353,7 @@
},
{
"name": "sqlglot/optimizer/qualify_columns.py",
"size": 35665,
"size": 37181,
"perm": 420
},
{
Expand All @@ -368,7 +368,7 @@
},
{
"name": "sqlglot/optimizer/simplify.py",
"size": 49778,
"size": 50106,
"perm": 420
},
{
Expand All @@ -378,12 +378,12 @@
},
{
"name": "sqlglot/parser.py",
"size": 285088,
"size": 288037,
"perm": 420
},
{
"name": "sqlglot/planner.py",
"size": 14577,
"size": 14634,
"perm": 420
},
{
Expand All @@ -408,12 +408,12 @@
},
{
"name": "sqlglot/tokens.py",
"size": 46496,
"size": 47308,
"perm": 420
},
{
"name": "sqlglot/transforms.py",
"size": 37439,
"size": 38116,
"perm": 420
},
{
Expand All @@ -427,32 +427,27 @@
"perm": 2147484141
},
{
"name": "sqlglotrs-0.2.13.dist-info",
"name": "sqlglotrs-0.3.0.dist-info",
"size": 0,
"perm": 2147484141
},
{
"name": "sqlglotrs-0.2.13.dist-info/INSTALLER",
"name": "sqlglotrs-0.3.0.dist-info/INSTALLER",
"size": 4,
"perm": 420
},
{
"name": "sqlglotrs-0.2.13.dist-info/METADATA",
"size": 546,
"name": "sqlglotrs-0.3.0.dist-info/METADATA",
"size": 545,
"perm": 420
},
{
"name": "sqlglotrs-0.2.13.dist-info/RECORD",
"size": 629,
"name": "sqlglotrs-0.3.0.dist-info/RECORD",
"size": 534,
"perm": 420
},
{
"name": "sqlglotrs-0.2.13.dist-info/REQUESTED",
"size": 0,
"perm": 420
},
{
"name": "sqlglotrs-0.2.13.dist-info/WHEEL",
"name": "sqlglotrs-0.3.0.dist-info/WHEEL",
"size": 106,
"perm": 420
},
Expand All @@ -463,7 +458,7 @@
},
{
"name": "sqlglotrs/sqlglotrs.cpython-312-darwin.so",
"size": 738352,
"size": 710816,
"perm": 493,
"compressed": true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: sqlglot
Version: 25.30.0
Version: 26.0.1
Summary: An easily customizable SQL parser and transpiler
Home-page: https://github.com/tobymao/sqlglot
Author: Toby Mao
Expand Down Expand Up @@ -31,11 +31,11 @@ Requires-Dist: types-pytz; extra == "dev"
Requires-Dist: typing-extensions; extra == "dev"
Requires-Dist: maturin<2.0,>=1.4; extra == "dev"
Provides-Extra: rs
Requires-Dist: sqlglotrs==0.2.13; extra == "rs"
Requires-Dist: sqlglotrs==0.3.0; extra == "rs"

![SQLGlot logo](sqlglot.png)

SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [23 different dialects](https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/__init__.py) like [DuckDB](https://duckdb.org/), [Presto](https://prestodb.io/) / [Trino](https://trino.io/), [Spark](https://spark.apache.org/) / [Databricks](https://www.databricks.com/), [Snowflake](https://www.snowflake.com/en/), and [BigQuery](https://cloud.google.com/bigquery/). It aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects.
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [24 different dialects](https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/__init__.py) like [DuckDB](https://duckdb.org/), [Presto](https://prestodb.io/) / [Trino](https://trino.io/), [Spark](https://spark.apache.org/) / [Databricks](https://www.databricks.com/), [Snowflake](https://www.snowflake.com/en/), and [BigQuery](https://cloud.google.com/bigquery/). It aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects.

It is a very comprehensive generic SQL parser with a robust [test suite](https://github.com/tobymao/sqlglot/blob/main/tests/). It is also quite [performant](#benchmarks), while being written purely in Python.

Expand Down
Loading

0 comments on commit 47592ff

Please sign in to comment.