Skip to content

v0.8.0-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@johnedquinn johnedquinn released this 18 Oct 19:50
d8bcf1f

Description

This is a major version release for v0.8.0-alpha.

Breaking Changes

  • Replaced union, intersect, except IR nodes with common bag_op IR node
  • Renamed PassResult to PlannerPassResult for clarity. (This is part of the experimental query planner API.)
  • Removed [ExprValueType.typeNames] as needed by the future work of legacy parser removal and OTS

Added

  • CHANGELOG.md with back-filling of the previous releases to the change log to provide more visibility on unreleased
    changes and make the release process easier by using the unreleased section of change log. The CONTRIBUTING.md
    has also been updated to ensure this is part of the process.
  • backward-incompatiblity and dependency questions are added to the project's PR process to provide more context
    on the changes that include these and the alternatives that have been considered.
  • README.md badges for GitHub Actions status, codecov, and license
  • An experimental (pending #15) embedding of a subset of
    the GPML (Graph Pattern Matching Language) graph query, as a new expression
    form <expr> MATCH <gpml_pattern>, which can be used as a bag-of-structs data source in the FROM clause.
    The use within the grammar is based on the assumption of a new graph data type being added to the
    specification of data types within PartiQL, and should be considered experimental until the semantics of the graph
    data type are specified.
    • basic and abbreviated node and edge patterns (section 4.1 of the GPML paper)
    • concatenated path patterns (section 4.2 of the GPML paper)
    • path variables (section 4.2 of the GPML paper)
    • graph patterns (i.e., comma separated path patterns) (section 4.3 of the GPML paper)
    • parenthesized patterns (section 4.4 of the GPML paper)
    • path quantifiers (section 4.4 of the GPML paper)
    • restrictors and selector (section 5.1 of the GPML paper)
    • pre-filters and post-filters (section 5.2 of the GPML paper)
  • Added EvaluatonSession.context: A string-keyed map of arbitrary values which provides a way to make
    session state such as current user and transaction details available to custom [ExprFunction] implementations
    and custom physical operator implementations.
  • Replaces union, intersect, except IR nodes with common bag_op IR node
  • Add support for CallAgg in Type Inferencer.
  • A GitHub Workflow to automatically sync the docs directory with the GitHub Wiki
  • Introduces the PartiQLParser, an implementation of Parser using ANTLR
    • Matches the functionality of the existing SqlParser
    • Now catches a StackOverflowError and throws a ParserException
    • Support for DQL, DDL, DML, GPML, and EXEC
    • Handles consistency and precedence issues seen in SqlParser
  • Parsing of INSERT DML with ON CONFLICT DO REPLACE EXCLUDED based on RFC-0011
  • Adds a subset of REPLACE INTO and UPSERT INTO parsing based on RFC-0030
    • Parsing of target attributes is not supported yet and is pending #841
  • Logical plan representation and evaluation support for INSERT DML with ON CONFLICT DO REPLACE EXCLUDED and REPLACE INTO based on RFC-0011
  • Logical plan representation of INSERT DML with ON CONFLICT DO UPDATE EXCLUDED and UPSERT INTO based on RFC-0011
  • Enabled projection alias support for ORDER BY clause

Experimental Planner Additions

  • Renamed PassResult to PlannerPassResult for clarity. (This is part of the experimental query planner API.)
  • The PlannerPipeline API now has experimental and partial support for INSERT and DELETE DML statements—
    tracking PartiQL specification issues are partiql-docs/#4 (only
    a subset has been implemented--see examples below) and
    partiql-docs/#19.
    • Examples of supported statements include:
      • INSERT INTO foo << { 'id': 1, 'name': 'bob' }, { 'id': 2, 'name' : 'sue' } >> (multi record insert)
      • INSERT INTO foo SELECT c.id, c.name FROM customer AS c (insert the results of a query into another table)
      • DELETE FROM foo (delete all records in a table)
      • DELETE FROM foo AS f WHERE f.zipCode = '90210' (delete all records matching a predicate)
  • Introduced planner event callbacks as a means to provide a facility that allows the query to be visualized at every
    stage in the PlannerPipeline and to generate performance metrics for the individual phases of query planning. See
    PlannerPipe.Builder.plannerEventCallback for details.
  • Adds the following optimization passes, none of which are enabled by default:
    • FilterScanToKeyLookupPass which performs a simple optimization common to most databases: it converts a filter
      predicate covering a table's complete primary key into a single get-by-key operation, thereby avoiding a full table
      scan. This may pass leave behind some useless and expressions if more and operands exist in the filter predicate
      other than primary key field equality expressions.
    • RemoveUselessAndsPass, which removes any useless and expressions introduced by the previous pass or by the
      query author, e.g. true and x.id = 42 -> x.id = 42), true and true -> true, etc.
    • RemoveUselessFiltersPass, which removes useless filters introduced by the previous pass or by the query author
      (e.g. (filter (lit true) <bexpr>)) -> <bexpr>.
  • Add support for UNPIVOT, the behavior is expected to be compatible with the evaluating compiler.
  • Adds support for GROUP BY (aggregations, group keys, etc)
  • Adds support for ORDER BY in Planner
  • Adds support for PIVOT in the planner consistent with EvaluatingCompiler

Changed

  • The default parser for all components of PartiQL is now the PartiQLParser -- see the deprecation of SqlParser
  • Parsing of ORDER BY clauses will no longer populate the AST with defaults for the 'sort specification'
    (i.e., ASC or DESC) or 'nulls specification' (i.e., NULLS FIRST or NULLS LAST) when the are not provided in
    the query text. Defaulting of sort order is moved to the evaluator.

Deprecated

  • Deprecates SqlLexer and SqlParser to be replaced with the PartiQLParserBuilder.
  • Deprecates helper method, blacklist, within org.partiql.lang.eval and introduced a functionally equivalent
    org.partiql.lang.eval.denyList method.
  • Deprecates TypedOpParameter.LEGACY to be replaced with TypedOpParameter.HONOR_PARAMETERS

Fixed

  • Codecov report uploads in GitHub Actions workflow
  • GitHub Actions capability to run on forks
  • Negation overflow caused by minimum INT8
  • Type mismatch error caused by evaluator's integer overflow check
  • Cast function's behavior on positive_infinity, negative_infinity, and NaN explicitly defined and handled.
  • Changed Trim Function Specification handling(fixed error message, and now can take case-insensitive trim spec)

Removed

  • README.md badge for travisci
  • Breaking Change: removed [ExprValueType.typeNames] as needed by the future work of legacy parser removal and OTS

List of commits: v0.7.0-alpha...v0.8.0-alpha