sqlglot icon indicating copy to clipboard operation
sqlglot copied to clipboard

Python SQL Parser and Transpiler

Results 37 sqlglot issues
Sort by recently updated
recently updated
newest added

This PR adds support for the `JOIN` pipe syntax. | Operator | Implemented | |--------------------|-------------| | `FROM` | ✅ | | `SELECT` | ✅ | | `WHERE` | ✅ |...

Sqlglot version: 26.25.3 Reading dialect: BigQuery Writing dialect: N/A **Fully reproducible code snippet** ```python from loguru import logger from sqlglot import Expression from sqlglot.dialects.dialect import Dialect from sqlglot.errors import OptimizeError...

Docs: [Trino](https://trino.io/docs/current/functions/session.html#:~:text=running%20the%20query.-,current_catalog,-%23) [Postgres](https://www.postgresql.org/docs/current/functions-info.html#:~:text=current_catalog%20%E2%86%92%20name) The following dialects do not support this: ```code SELECT CURRENT_CATALOG; ``` - ClickHouse - MySQL - Oracle - MariaDB - SingleStore ✅ Tested on the platform

Mainly just tests for Snowflake, but in testing I noticed an inconsistency in naming on duckdb. It uses the alias of VAR_SAMP called VARIANCE. I made it consistent so it's...

Issue: https://fivetran.atlassian.net/browse/RD-1066808 Problem: In BigQuery, when you UNNEST an ARRAY, the struct fields can be referenced as unqualified columns (e.g., WHERE type = 'x'). This worked in simple queries but...

**Named Arguments** In Snowflake, [ROUND()](https://docs.snowflake.com/en/sql-reference/functions/round) can be used with named arguments, which is not supported in [DuckDB](https://duckdb.org/docs/stable/sql/functions/numeric#roundv-numeric-s-integer). ``` >>> parse_one("ROUND(EXPR => -2.5, SCALE => 0, ROUNDING_MODE => 'HALF_AWAY_FROM_ZERO')", "snowflake") Round(...

**What motivated this PR?** Exasol doesn't support a bare * alongside other select items. **How is the existing logic in main incorrect?** For example, when transpiling `SELECT *, 1 FROM...