All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING partiql-parser: Added a source location to
ParseError::UnexpectedEndOfInput
- BREAKING partiql-ast: Changed the modelling of parsed literals.
- BREAKING partiql-logical: Changed the modelling of logical plan literals.
- partiql-eval: Fixed behavior of comparison and
BETWEEN
operations w.r.t. type mismatches
- partiql-value: Pretty-printing of
Value
viaToPretty
trait
- BREAKING partiql-catalog: refactored structure of crate; module paths have changes
- Added
partiql-common
. - Added
NodeId
toStaticType
. - BREAKING Added thread-safe
PartiqlShapeBuilder
and automaticNodeId
generation for theStaticType
. - Added a static thread safe
shape_builder
function that provides a convenient way for usingPartiqlShapeBuilder
for creating new shapes. - Added
partiql_common::meta::PartiqlMetadata
- Added ability for crate importers to add scalar User Defined Functions (UDFs) to the catalog
- Added
extension/partiql-extension-value-functions
crate demonstrating use of scalar UDFs - Added
TUPLEUNION
andTUPLECONCAT
functions in theextension/partiql-extension-value-functions
crate
- BREAKING Removed
partiql-source-map
. - BREAKING Removed
const
PartiQL types underpartiql-types
in favor ofPartiqlShapeBuilder
. - BREAKING Removed
StaticType
'snew
,new_non_nullable
, andas_non-nullable
APIs in favor ofPartiqlShapeBuilder
.
- partiql-ast: fixed pretty-printing of
PIVOT
- partiql-ast: improved pretty-printing of
CASE
and various clauses
- BREAKING: partiql-ast: added modeling of
EXCLUDE
- BREAKING: partiql-ast: added pretty-printing of
EXCLUDE
- BREAKING Moved some of the
PartiqlShape
APIs to thePartiqlShapeBuilder
. - BREAKING Prepended existing type macros with
type
to make macro names more friendly: e.g.,type_int!
- BREAKING Moved node id generation and
partiql-source-map
to it. - BREAKING Changed
AutoNodeIdGenerator
to a thread-safe version
- BREAKING: partiql-parser: added parsing of
EXCLUDE
- BREAKING: partiql-ast: changed modeling of
BagOpExpr
setq
field to be anOption
- BREAKING: partiql-ast: changed modeling of
GroupByExpr
strategy
field to be anOption
- BREAKING: partiql-ast: changed modeling of
PathStep
to splitPathExpr
toPathIndex
(e.g.,[2]
) andPathProject
(e.g.,.a
) - BREAKING: partiql-ast: changed modeling of
PathStep
to renamePathWildcard
toPathForEach
(for[*]
) - BREAKING: partiql-types: changed type ordering to match specification order
- BREAKING: partiql-types: changed some interfaces to reduce clones and be more ergonomic
- partiql-ast: Pretty-printing of AST via
ToPretty
trait - partiql-ast: Added
NodeBuilder
to make building ASTs easier
- Minor documentation issues
- BREAKING: Adds
optionality
toStructField
inpartiql-types
- BREAKING: Removed
NULL
andMISSING
types frompartiql_types::PartiQLType
- BREAKING: Removed
partiql_ast_passes::partiql_type
- BREAKING: Introduces
PartiqlShape
and removesPartiqlType
- Adds
partiql-extension-ddl
that allows generation of PartiQL Basic DDL Syntax for a PartiQL Shape.
0.7.2 - 2024-04-12
- partiql-types: Fixed handling of struct fields to be resilient to field order w.r.t. equality and hashing
0.7.1 - 2024-03-15
- partiql-eval: Fixed propagation of errors in subqueries to outer query
- partiql-eval: Fixed handling of nested binding environments in subqueries
0.7.0 - 2024-03-12
- Adds quotes to the attributes of PartiQL tuple's debug output so it can be read and transformed using Kotlin
partiql-cli
- BREAKING: partiql-eval: Changes the interface to
EvalPlan
to accept anEvalContext
- BREAKING: partiql-eval: Changes
EvaluationError
to not implementClone
- BREAKING: partiql-eval: Changes the structure of
EvalPlan
- partiql-extension-visualize: Add
partiql-extension-visualize
for visualizing AST and logical plan - partiql-eval: Add a
SessionContext
containing both a system-level and a user-level context object usable by expression evaluation
- partiql-logical-planner: Fixed
ORDER BY
's ability to see into projection aliases - partiql-eval: Fixed errors in
BaseTableExpr
s get added to the evaluation context - partiql-eval: Fixed certain errors surfacing in Permissive evaluation mode, when they should only be present in Strict mode
0.6.0 - 2023-10-31
- BREAKING: partiql-value:
BindingsName
changed to holdCow<str>
rather thanString
- BREAKING: partiql-eval: Construction of expression evaluators changed to separate binding from evaluation of expression. & implement strict eval
- BREAKING: partiql-value:
Value
trait'sis_null_or_missing
renamed tois_absent
- BREAKING: partiql-value:
Value
trait'scoerce_to_tuple
,coerece_to_bag
, andcoerce_to_list
methods renamed tocoerce_into_tuple
,coerece_into_bag
, andcoerece_into_list
. - BREAKING: partiql-value:
Tuple
'spairs
andinto_pairs
changed to return concreteIterator
types. - BREAKING: partiql-eval:
EvaluatorPlanner
construction now takes anEvaluationMode
parameter. - BREAKING: partiql-eval:
like_to_re_pattern
is no longer public. - BREAKING: partiql-value: Box Decimals in
Value
to assureValue
fits in 16 bytes. - BREAKING: partiql-logical-planner: moves
NameResolver
topartiql-ast-passes
- BREAKING: partiql-value: removes
partiql
from value macro_rules; e.g.partiql_bag
renames tobag
. - BREAKING: partiql-ast: changed modeling of
Query
andSetExpr
nodes to supportORDER BY
,LIMIT
,OFFSET
in children of set operators- Affects the AST and visitor
- BREAKING: partiql-ast: rename of
SetExpr
toBagOpExpr
andSetOp
toBagOp
- Affects the AST and visitor
- BREAKING: partiql-parser:
Parsed
struct'sast
field is now anast::AstNode<ast::TopLevelQuery>
- BREAKING: partiql-eval:
Evaluable
trait'supdate_input
fn now also takes in anEvalContext
- BREAKING: partiql-eval: changed modeling of
Project
exprs
to be aVec<(String, ValueExpr)>
rather than aHashMap<String, ValueExpr>
to support multiple project items with the same alias - BREAKING: partiql-logical: changed modeling of
VarRef
to include aVarRefType
to indicate whether to do a local vs global binding lookup
- Strict mode evaluation partial support added.
- Add interface for
STRICT
mode evalution toEvaluatorPlanner
. - Add ability for partiql-extension-ion extension encoding/decoding of
Value
to/from IonElement
- Add
partiql-types
crate that includes data models for PartiQL Types. - Add
partiql_ast_passes::static_typer
for type annotating the AST. - Add ability to parse
ORDER BY
,LIMIT
,OFFSET
in children of set operators - Add
OUTER
bag operator (OUTER UNION
,OUTER INTERSECT
,OUTER EXCEPT
) implementation - Add experimental
partiql_logical_planner::typer
for typing PartiQL queries with the initial support for simple SFW queries withSELECT
andFROM
clauses only with no operators, JOINs, etc. - Add
NullSortedValue
to specify ordering null or missing valuespartiql_value::Value
s before or after all other values - Implements the aggregation functions
ANY
,SOME
,EVERY
and theirCOLL_
versions - Add
COUNT(*)
implementation - Add
to_vec
method toList
andBag
to convert to aVec
- Fixes parsing of multiple consecutive path wildcards (e.g.
a[*][*][*]
), unpivot (e.g.a.*.*.*
), and path expressions (e.g.a[1 + 2][3 + 4][5 + 6]
)—previously these would not parse correctly. - partiql-parser set quantifier for bag operators fixed to
DISTINCT
- partiql-parser set quantifier for bag operators fixed to be
DISTINCT
when unspecified - partiql-logical-planner add error for when a
HAVING
is included withoutGROUP BY
- Fixes variable resolution lookup order and excessive lookups
- Fixes variable resolution of some ORDER BY variables
- Fixes nested list/bag/tuple type ordering for when
ASC NULLS LAST
andDESC NULLS FIRST
are specified - partiql-value fix deep equality of list, bags, and tuples
- Fixes bug when using multiple aggregations without a
GROUP BY
- Performance improvements to grouping/evaluation
0.5.0 - 2023-06-06
- BREAKING: partiql-eval:
evaluate
onEvaluable
returns aValue
rather than anOption<Value>
- BREAKING: partiql-ast: changes the modeling of Bag/List/Tuple literals
- Ability to add and view errors during evaluation with partiql-eval's
EvalContext
- AST sub-trees representing literal values are lowered to
Value
s during planning
0.4.1 - 2023-05-25
- partiql-extension-ion-functions : Made
IonExtension
pub
0.4.0 - 2023-05-24
- BREAKING: partiql-eval: modifies visibility of types implementing
EvalExpr
andEvaluable
- BREAKING: removed
from_ion
method onValue
- BREAKING: partiql-ast:
visit
fn returns apartiql-ast::Recurse
type to indicate if visitation of children nodes should continue - BREAKING: partiql-logical-planner: modifies
lower(parsed: &Parsed)
to return a Result type ofResult<logical::LogicalPlan<logical::BindingsOp>, LoweringError>
rather than alogical::LogicalPlan<logical::BindingsOp>
- BREAKING: partiql-eval: modifies
compile(&mut self, plan: &LogicalPlan<BindingsOp>)
to return a Result type ofResult<EvalPlan, PlanErr>
rather than anEvalPlan
- This is part of an effort to replace
panic
s withResult
s
- This is part of an effort to replace
- BREAKING: partiql-logical-planner: Adds a
LogicalPlanner
to encapsulate thelower
method - BREAKING: partiql-eval: Adds a
EvaluatorPlanner
now requires aCatalog
to be supplied at initialization - BREAKING: partiql-logical-planner:
CallDef
and related types moved to partiql-catalog
- Implements built-in function
EXTRACT
- Add
partiql-extension-ion
extension for encoding/decodingValue
to/from Ion data - Add
partiql-extension-ion-functions
extension which contains an extension function for reading from an Ion file - Add
partiql-catalog
including an experimentalCatalog
interface and implementation - Implements the
COLL_*
functions --COLL_AVG
,COLL_COUNT
,COLL_MAX
,COLL_MIN
,COLL_SUM
- Adds AST to logical plan lowering for
IN
expressions
- Fix parsing of
EXTRACT
datetime partsYEAR
,TIMEZONE_HOUR
, andTIMEZONE_MINUTE
- Fix logical plan to eval plan conversion for
EvalOrderBySortSpec
with argumentsDESC
andNULLS LAST
- Fix parsing of
EXTRACT
to allow keywords after theFROM
0.3.0 - 2023-04-11
EvalExpr.evaluate
function now returns a Cow ofValue
Evaluable
trait'sget_vars
function returns by ref- Refactor of
partiql-eval
crate- Operators previously implementing
Evaluable
(e.g.EvalScan
,EvalFilter
) are under theeval::evaluable
module - Expressions previously implementing
EvalExpr
(e.g.EvalBinOpExpr
,EvalLitExpr
) are under theeval::expr
module
- Operators previously implementing
- Refactor
CallAgg
partiql-ast
node
- Adds some benchmarks for parsing, compiling, planning, & evaluation
- Implements more built-in functions --
POSITION
,OCTET_LEN
,BIT_LEN
,ABS
,MOD
,CARDINALITY
,OVERLAY
- Implements
PIVOT
operator in evaluator - Implements
LIKE
for non-string, non-literals serde
feature topartiql-value
andpartiql-logical
withSerialize
andDeserialize
traits- Adds
Display
forLogicalPlan
- Expose
partiql_value::parse_ion
as a public API - Adds some convenience methods on
Value
- Add
Extend
implementations forList
andBag
- Add methods to iterate a
Tuple
's values without zipping its names - Allow
collect()
into aTuple
with anyInto<String>
- Add
- Parse
OUTER UNION
/INTERSECT
/EXCEPT
- Parse
WITH
clause - Implements
LIMIT
andOFFSET
operators in evaluator DATE
/TIME
/TIMESTAMP
values- Parse
TABLE <id>
references - Implements
GROUP BY
operator in evaluator - Implements
HAVING
operator in evaluator - Implements
ORDER BY
operator in evaluator - Implements SQL aggregation functions (
AVG
,COUNT
,MAX
,MIN
,SUM
) in evaluator
- Some performance improvements from removing extraneous
clone
s and tweaking buffer sizes - Fix off by one error when checking preconditions to lower join
ON
- Recognize aggregate fn names in parser
- Pass-through comments when processing special forms
- Make
BY <x>
optional inGROUP
clause - Fix
JOIN
parsing by defaulting toINNER
and allowing elision of keywords - Allow un-parenthesized subquery as the only argument of a function in parser
- Fix handling of List/Bag/Tuple in keyword argument preprocessing in parser
- Fixes Tuple value duplicate equality and hashing
- Properly skip comments when parsing
0.2.0 - 2023-01-10
- BREAKING: Refactors the AST
- Removes Location from the AST, replacing with a 'node id' that gives the AST node identity; the id can be used to retrieve Location
- Removes redundancies and extraneous nesting
- Refactor some AST nodes (including
FROM
,WHERE
, andHAVING
clauses) for better visitation - Refactor
FromSource
to not wrap inAstNode
- Adds end-to-end PartiQL query evaluation with the following supported features
- SELECT-FROM-WHERE
- LATERAL LEFT, INNER, CROSS JOINs
- UNPIVOT
- SELECT VALUE
- Query expressions
- List, Bag, Tuple constructors
- Path expressions (wildcard & unpivot path are not yet supported)
- Subquery (supported in logical and eval plan; not yet in AST to plan conversion)
- DISTINCT
- Variable references
- Literals
- Arithmetic operators (+, -, *, /, %)
- Logical operators (AND, OR, NOT)
- Equality operators (= , !=)
- Comparison operators (<, >, <=, >=)
- IS [NOT] MISSING, IS [NOT] NULL
- IN
- BETWEEN
- LIKE
- Searched and simple case expressions
- COALESCE and NULLIF
- CONCAT
- And the following functions
- LOWER
- UPPER
- CHARACTER_LENGTH
- LTRIM
- BTRIM
- RTRIM
- SUBSTRING
- EXISTS
- Adds
Visit
andVisitor
traits for visiting AST - Add AST node
Visit
impls viaproc_macro
s - Adds PartiQL
Value
, an in-memory representation of PartiQL values- Supports PartiQL values other than
DATE
,TIME
, s-expressions - Supports basic arithmetic, logical, equality, and comparison operators
- Supports partiql parsing of Ion into
Value
- Supports PartiQL values other than
- Defines logical plan and evaluation DAG
- AST lowering to logical plan with name resolution
partiql-conformance-tests
support for parsing and running evaluation tests frompartiql-tests
0.1.0 - 2022-08-05
- Lexer & Parser for the majority of PartiQL query capabilities—see syntax success and fail tests for more details.
- AST for the currently parsed subset of PartiQL
- Tracking of locations in source text for ASTs and Errors
- Parser fuzz tester
- Conformance tests via test generation from partiql-tests
- PartiQL Playground proof of concept (POC)
- PartiQL CLI with REPL and query visualization features