Skip to content

Latest commit

 

History

History
344 lines (181 loc) · 12 KB

CHANGELOG.md

File metadata and controls

344 lines (181 loc) · 12 KB

Changelog

v11.2.0

Changes:

  • Breaking: Replaced "schema" arg from Column expression with "db" and "catalog".

  • Breaking: Removed mapping of "{{" to BLOCK_START token.

  • New: Added new optimizer pass: unknown star expansion.

  • New: Added support for INSERT OR ... syntax.

  • New: Added support for ILIKE/LIKE ANY.

  • Improvement: Made the optimizer more robust.

  • Improvement: Improved parsing of GROUP BY to better handle ROLLUP, CUBE and GROUPING SETS.

  • Improvement: Refactored UDTF scope.

  • Improvement: Fixed parsing for UDF typical parameters in order to handle constraints.

v11.1.0

Changes:

  • Breaking: Although this is a breaking change, it fixes and makes the behavior of escaped characters more consistent. Now SQLGlot preserves all line break inputs as they come.

v11.0.0

Changes:

  • Breaking: Renamed ESCAPES to STRING_ESCAPES in the Tokenizer class.

  • New: Deployed pdoc documentation page.

  • New: Add support for read locking using the FOR UPDATE/SHARE syntax (e.g. MySQL).

  • New: Added support for CASCADE, SET NULL and SET DEFAULT constraints.

  • New: Added "cast" expression helper.

  • New: Add support for transpiling Postgres GENERATE_SERIES into Presto SEQUENCE.

  • Improvement: Fix tokenizing of identifier escapes.

  • Improvement: Fix eliminate_subqueries bug related to unions.

  • Improvement: IFNULL is now transpiled to COALESCE by default for every dialect.

  • Improvement: Refactored the way properties are handled. Now it's easier to add them and specify their position in a SQL expression.

  • Improvement: Fixed alias quoting bug.

  • Improvement: Fixed CUBE / ROLLUP / GROUPING SETS parsing and generation.

  • Improvement: Fixed get_or_raise Dialect/t.Type[Dialect] argument bug.

  • Improvement: Improved python type hints.

v10.6.0

Changes:

  • Breaking: Change Power to binary expression.

  • New: x GLOB y support.

v10.5.0

Changes:

v10.4.0

Changes:

  • Breaking: Removed the quote_identities optimizer rule.

  • New: ARRAYAGG, SUM, ARRAYANY support in the engine. SQLGlot is now able to execute all TPC-H queries.

  • Improvement: Transpile DATEDIFF to postgres.

  • Improvement: Right join pushdown fixes.

  • Improvement: Have Snowflake generate VALUES columns without quotes.

  • Improvement: Support NaN values in convert.

  • Improvement: Recursive CTE scope fixes.

v10.3.0

Changes:

  • Breaking: Json ops changed to binary expressions.

  • New: Jinja tokenization.

  • Improvement: More robust type inference.

v10.2.0

Changes:

  • Breaking: types inferred from annotate_types are now DataType objects, instead of DataType.Type.

  • New: the optimizer can now simplify BETWEEN expressions expressed as explicit comparisons.

  • New: the optimizer now removes redundant casts.

  • New: added support for Redshift's ENCODE/DECODE.

  • New: the optimizer now treats identifiers as case-insensitive.

  • New: the optimizer now handles nested CTEs.

  • New: the executor can now execute SELECT DISTINCT expressions.

  • New: added support for Redshift's COPY and UNLOAD commands.

  • New: added ability to parse LIKE in CREATE TABLE statement.

  • New: the optimizer now unnests scalar subqueries as cross joins.

  • Improvement: fixed Bigquery's ARRAY function parsing, so that it can now handle a SELECT expression as an argument.

  • Improvement: improved Snowflake's ARRAY and MAP constructs.

  • Improvement: fixed transpilation between STRING_AGG and GROUP_CONCAT.

  • Improvement: the INTO clause can now be parsed in SELECT expressions.

  • Improvement: improve executor; it currently executes all TPC-H queries up to TPC-H 17 (inclusive).

  • Improvement: DISTINCT ON is now transpiled to a SELECT expression from a subquery for Redshift.

v10.1.0

Changes:

  • Breaking: refactored the way SQL comments are handled. Before at most one comment could be attached to an expression, now multiple comments may be stored in a list.

  • Breaking: refactored the way properties are represented and parsed. The argument this now stores a property's attributes instead of its name.

  • New: added structured ParseError properties.

  • New: the executor now handles set operations.

  • New: sqlglot can now execute SQL queries using python objects.

  • New: added support for the Drill dialect.

  • New: added a canonicalize method which leverages existing type information for an expression to apply various transformations to it.

  • New: TRIM function support for Snowflake and Bigquery.

  • New: added support for SQLite primary key ordering constraints (ASC, DESC).

  • New: added support for Redshift DISTKEY / SORTKEY / DISTSTYLE properties.

  • New: added support for SET TRANSACTION MySQL statements.

  • New: added null, true, false helper methods to avoid using singleton expressions.

  • Improvement: allow multiple aggregations in an expression.

  • Improvement: execution of left / right joins.

  • Improvement: execution of aggregations without the GROUP BY clause.

  • Improvement: static query execution (e.g. SELECT 1, SELECT CONCAT('a', 'b') AS x, etc).

  • Improvement: include a rule for type inference in the optimizer.

  • Improvement: transaction, commit expressions parsed at finer granularity.

v10.0.0

Changes:

  • Breaking: replaced SQLGlot annotations with comments. Now comments can be preserved after transpilation, and they can appear in other places besides SELECT's expressions.

  • Breaking: renamed list_get to seq_get.

  • Breaking: activated mypy type checking for SQLGlot.

  • New: Azure Databricks support.

  • New: placeholders can now be replaced in an expression.

  • New: null safe equal operator (<=>).

  • New: SET statements for MySQL.

  • New: SHOW commands for MySQL.

  • New: FORMAT function for TSQL.

  • New: CROSS APPLY / OUTER APPLY support for TSQL.

  • New: added formats for TSQL's DATENAME/DATEPART functions.

  • New: added styles for TSQL's CONVERT function.

  • Improvement: refactored the schema to be more lenient; before it needed to do an exact match of db.table, now it finds table if there are no ambiguities.

  • Improvement: allow functions to inherit their arguments' types, so that annotating CASE, IF etc. is possible.

  • Improvement: allow joining with same names in the python executor.

  • Improvement: the "using" field can now be set for the join expression builders.

  • Improvement: qualify_columns now qualifies only non-alias columns in the having clause.

v9.0.0

Changes:

  • Breaking : Changed AST hierarchy of exp.Table with exp.Alias. Before Tables were children's of their aliases, but in order to simplify the AST and fix some issues, Tables now have an alias property.

v8.0.0

Changes:

  • Breaking : New add_table method in Schema ABC.

  • New: SQLGlot now supports the PySpark dataframe API. This is still relatively experimental.

v7.1.0

Changes:

  • Improvement: Pretty generator now takes max_text_width which breaks segments into new lines

  • New: exp.to_table helper to turn table names into table expression objects

  • New: int[] type parsers

  • New: annotations are now generated in sql

v7.0.0

Changes:

  • Breaking: DISTINCT within functions now take in multiple values eg. COUNT(DISTINCT a, b). exp.Distinct no longer uses this and now uses the expressions property

  • New: Expression False kwargs are now excluded from equality checks

  • New: Parse DESCRIBE and CREATE SCHEMA

  • New: DELETE and VALUES builder

  • New: Unused CTE and JOINS are now removed in the optimizer

v6.3.0

Changes:

  • New: Snowflake table literals

  • New: Anti and semi joins

  • New: Vacuum as a command

  • New: Stored procedures

  • New: Reweriting derived tables as CTES

  • Improvement: Various clickhouse improvements

  • Improvement: Optimizer predicate pushdown

  • Breaking: DATE_DIFF default renamed to DATEDIFF

v6.2.0

Changes:

  • New: TSQL support

  • Breaking: Removed $ from tokenizer, added @ placeholders

  • Improvement: Nodes can now be removed in transform and replace 8cd81c3

  • Improvement: Snowflake timestamp support

  • Improvement: Property conversion for CTAS Builder

  • Improvement: Tokenizers are now unique per dialect instance

v6.1.0

Changes:

  • New: mysql group_concat separator 49a4099

  • Improvement: Better nested select parsing 45603f