Releases: partiql/partiql-lang-kotlin
v0.14.1
Added
- Adds the ability to define a user-defined-function in
ConnectorMetadata
- Move
ConnectorMetadata
map fromPartiQLPlanner
toPartiQLPlanner.Session
for planner re-use.- Deprecates 2 APIs in
org.partiql.planner.PartiQLPlannerBuilder
in favor of using the ConnectorMetadata map inPartiQLPlanner.Session
.
- Deprecates 2 APIs in
Deprecated
- See the "Added" section.
Contributors
Thank you to all who have contributed!
List of commits: v0.14.0-alpha...v0.14.1.
v0.14.0-alpha
Release v0.14.0-alpha
Added
- Adds top-level IR node creation functions.
- Adds
componentN
functions (destructuring) to IR nodes via Kotlin data classes - Adds public
tag
field to IR nodes for associating metadata - Adds AST Normalization Pass.
- Adds PartiQLPlanner Interface, which is responsible for translate an AST to a Plan.
- EXPERIMENTAL Evaluation of
EXCLUDE
in theEvaluatingCompiler
- This is currently marked as experimental until the RFC is approved partiql/partiql-lang#27
- EXPERIMENTAL: Adds support for EXCLUDE in the default SqlDialect.
Changed
- StaticTypeInferencer and PlanTyper will not raise an error when an expression is inferred to
NULL
orunionOf(NULL, MISSING)
. In these cases the StaticTypeInferencer and PlanTyper will still raise the Problem CodeExpressionAlwaysReturnsNullOrMissing
but the severity of the problem has been changed to warning. In the case an expression always returnsMISSING
, problem codeExpressionAlwaysReturnsMissing
will be raised, which will have problem severity of error. - BREAKING The default integer literal type is now 32-bit; if the literal can not fit in a 32-bit integer, it overflows to 64-bit.
- BREAKING
PartiQLValueType
now distinguishes between Arbitrary Precision Decimal and Fixed Precision Decimal. - BREAKING Function Signature Changes. Now Function signature has two subclasses,
Scalar
andAggregation
. - BREAKING Plugin Changes. Only return one
Connector.Factory
, use Kotlin fields. JVM signature remains the same. - BREAKING In the produced plan:
- The new plan is fully resolved and typed.
- Operators will be converted to function call.
- Changes the return type of
filter_distinct
to a list if input collection is list - Changes the
PartiQLValue
collections to implementIterable
rather thanSequence
, allowing for multiple consumption. - BREAKING Moves
PartiQLParserBuilder.standard().build()
to bePartiQLParser.default()
. - BREAKING Changed modeling of
EXCLUDE
inpartiql-ast
Deprecated
Fixed
- Fixes the CLI hanging on invalid queries. See issue #1230.
- Fixes Timestamp Type parsing issue. Previously Timestamp Type would get parsed to a Time type.
- Fixes PIVOT parsing to assign the key and value as defined by spec section 14.
- Fixes the physical plan compiler to return list when
DISTINCT
used withORDER BY
Removed
- BREAKING Removed IR factory in favor of static top-level functions. Change
Ast.foo()
tofoo()
- BREAKING Removed
org.partiql.lang.planner.transforms.AstToPlan
. Useorg.partiql.planner.PartiQLPlanner
. - BREAKING Removed
org.partiql.lang.planner.transforms.PartiQLSchemaInferencer
. In order to achieve the same functionality, one would need to use theorg.partiql.planner.PartiQLPlanner
.- To get the inferred type of the query result, one can do:
(plan.statement as Statement.Query).root.type
- To get the inferred type of the query result, one can do:
Security
Contributors
Thank you to all who have contributed!
v0.13.2-alpha
Release v0.13.2-alpha
Added
- Adds overridden
toString()
method for Sprout-generated code. - Adds CURRENT_DATE session variable to PartiQL.g4 and PartiQLParser
- Adds configurable AST to SQL pretty printer. Usage in Java
AstKt.sql(ast)
or in Kotlinast.sql()
. - Support parsing, planning, and evaluation of Bitwise AND operator (&).
- The Bitwise And Operator only works for integer operands.
- The operator precedence may change based on the pending operator precedence RFC.
- EXPERIMENTAL Adds
EXCLUDE
to parser, ast, plan, and plan schema inferencer- This feature is marked as experimental until an RFC is added https://github.com/partiql/partiql-spec/issues/39
- NOTE: this feature is not currently implemented in the evaluator
Fixed
- Fixes typing of scalar subqueries in the PartiQLSchemaInferencer. Note that usage of
SELECT *
in subqueries
is not fully supported. Please make sure to handle InferenceExceptions. - Fixes schema inferencer behavior for ORDER BY
Contributors
Thank you to all who have contributed!
List of commits: v0.13.1-alpha...v0.13.2-alpha
v0.13.1-alpha
Release v0.13.1-alpha
Added
- Adds
isInterruptible
property toCompileOptions
. The default value isfalse
. Please see the KDocs for more information. - Adds support for thread interruption in compilation and execution. If you'd like to opt-in to this addition, please see
theisInterruptible
addition above for more information. - Adds support for CLI users to use CTRL-C to cancel long-running compilation/execution of queries
Fixed
- Fix a bug in
FilterScanToKeyLookup
pass wherein it was rewriting primary key equality expressions with references
to the candidate row on both sides. Now it will correctly ignore such expressions. - Fixes build failure for version
0.13.0
by publishingpartiql-plan
as an independent artifact. Please note thatpartiql-plan
is experimental.
Contributors
Thank you to all who have contributed!
List of commits: v0.13.0-alpha...v0.13.1-alpha
v0.12.1-alpha
Release v0.12.1-alpha
Fixed
- Fixes build failure for version
0.12.0
by publishingpartiql-plan
andpartiql-parser
as independent artifacts. Please note thatpartiql-plan
andpartiql-parser
are experimental.
Contributors
Thank you to all who have contributed!
List of commits: v0.12.0-alpha...v0.12.1-alpha
v0.11.1-alpha
Release v0.11.1-alpha
Fixes
- Fixes build failure for version
0.11.0
by publishingpartiql-plan
as an independent artifact. Please note thatpartiql-plan
is experimental.
List of commits: v0.11.0-alpha...v0.11.1-alpha
v0.10.1-alpha
Release v0.10.1-alpha
Fixes
- Fixes build failure for version
0.10.0
by publishingpartiql-plan
as an independent artifact. Please note thatpartiql-plan
is experimental.
List of commits: v0.10.0-alpha...v0.10.1-alpha
v0.13.0-alpha
Release v0.13.0-alpha
Added
- Adds
org.partiql.value
(experimental) package for reading/writing PartiQL values - Adds function overloading to the
CompilerPipeline
and experimentalPartiQLCompilerPipeline
. - Adds new method
getFunctions()
toorg.partiql.spi.Plugin
. - Adds
PartiQLFunction
interface. - Adds
FunctionSignature
andFunctionParameter
class toorg/partiql/types/function
. - Adds a new flag
--plugins
to PartiQL CLI to allow users to specify the root of their plugins directory.
The default is~/.partiql/plugins
. Each implementer of a plugin should place a directory under the
plugins root containing the JAR corresponding with their plugin implementation.
Example:~/.partiql/plugins/customPlugin/customPlugin.jar
- Adds serialization and deserialization between IonValue and
org.partiql.value
. - Adds
org.partiql.ast
package and usage documentation - Adds
org.partiql.parser
package and usage documentation - Adds PartiQL's Timestamp Data Model.
- Adds support for Timestamp constructor call in Parser.
- Parsing of label patterns within node and edge graph patterns now supports
disjunction|
, conjunction&
, negation!
, and grouping. - Adds default
equals
andhashCode
methods for each generated abstract class of Sprout. This affects the generated
classes in:partiql-ast
and:partiql-plan
. - Adds README to
partiql-types
package. - Initializes PartiQL's Code Coverage library
- Adds support for BRANCH and BRANCH-CONDITION Coverage
- Adds integration with JUnit5 for ease-of-use
- For more information, see the "Writing PartiQL Unit Tests" article in our GitHub Wiki.
- Adds new constructor parameters to all variants of
PartiQLResult
. - Adds two new methods to
PartiQLResult
:getCoverageData
andgetCoverageStructure
.
Changed
- Breaking: all product types defined by the internal Sprout tool no longer generate interfaces. They are now abstract
classes due to the generation ofequals
andhashCode
methods. This change impacts many generated interfaces exposed
in:partiql-ast
and:partiql-plan
. - Standardizes
org/partiql/cli/functions/QueryDDB
and other built-in functions inorg/partiql/lang/eval/builtins
by the newExprFunction
format. - Breaking: Redefines
org/partiql/lang/eval/ExprFunctionkt.call()
method by only invokingcallWithRequired
function. - Breaking: Redefines
org/partiql/lang/eval/builtins/DynamicLookupExprFunction
by mergingvariadicParameter
intorequiredParameters
as aStaticType.LIST
.callWithVariadic
is now replaced bycallWithRequired
. - Upgrades ion-java to 1.10.2.
- Breaking (within experimental graph features): As part of extending
the language of graph label patterns:- Changed the type of the field
label
in AST nodes
org.partiql.lang.domains.PartiqlAst.GraphMatchPatternPart.{Node,Edge}
,
fromSymbolPrimitive
to newGraphLabelSpec
. - Changed the names of subclasses of
org.partiql.lang.graph.LabelSpec
,
fromOneOf
toName
, and fromWhatever
toWildcard
.
- Changed the type of the field
- Breaking the package
org.partiql.lang.errors
has been moved toorg.partiql.errors
, moved classes includeorg.partiql.lang.errors.ErrorCategory
->org.partiql.errors.ErrorCategory
org.partiql.lang.errors.Property
->org.partiql.errors.Property
org.partiql.lang.errors.PropertyValue
->org.partiql.errors.PropertyValue
org.partiql.lang.errors.PropertyType
->org.partiql.errors.PropertyType
org.partiql.lang.errors.PropertyValueMap
->org.partiql.errors.PropertyValueMap
org.partiql.lang.errors.ErrorCode
->org.partiql.errors.ErrorCode
org.partiql.lang.errors.Problem
->org.partiql.errors.Problem
org.partiql.lang.errors.ProblemDetails
->org.partiql.errors.ProblemDetails
org.partiql.lang.errors.ProblemSeverity
->org.partiql.errors.ProblemSeverity
org.partiql.lang.errors.ProblemHandler
->org.partiql.errors.ProblemHandler
- Breaking the
sourceLocation
field oforg.partiql.errors.Problem
was changed fromorg.partiql.lang.ast.SoureceLocationMeta
toorg.partiql.errors.ProblemLocation
. - Breaking removed redundant ValueParameter from FunctionParameter as all parameters are values.
- Introduces
isNullCall
andisNullable
properties to FunctionSignature. - Removed
Nullable...Value
implementations of PartiQLValue and made the standard implementations nullable. - Using PartiQLValueType requires optin; this was a miss from an earlier commit.
- Modified timestamp static type to model precision and time zone.
Deprecated
- Breaking: Deprecates the
Arguments
,RequiredArgs
,RequiredWithOptional
, andRequiredWithVariadic
classes,
along with thecallWithOptional()
,callWithVariadic()
, and the overloadedcall()
methods in theExprFunction
class,
marking them with a Deprecation Level of ERROR. Now, it's recommended to use
call(session: EvaluationSession, args: List<ExprValue>)
andcallWithRequired()
instead. - Breaking: Deprecates
optionalParameter
andvariadicParameter
in theFunctionSignature
with a Deprecation
Level of ERROR. Please use multiple implementations of ExprFunction and use the LIST ExprValue to
represent variadic parameters instead.
Fixed
Removed
- Breaking: Removes
optionalParameter
andvariadicParameter
fromorg.partiql.lang.types.FunctionSignature
. To continue support for evaluation ofoptionalParameters
, please create another same-named function. To continue support for evaluation ofvariadicParameter
, please use aStaticType.LIST
to hold all previously variadic parameters.
As this changes coincides with the addition of function overloading, onlycallWithRequired
will be invoked upon execution of anExprFunction
. Note: Function overloading is now allowed, which is the reason for the removal ofoptionalParameter
andvariadicParameter
. - Breaking: Removes unused class
Arguments
fromorg.partiql.lang.eval
. - Breaking: Removes unused parameter
args: Arguments
fromorg.partiql.lang.eval.ExprFunctionkt.call()
method.
Security
Contributors
Thank you to all who have contributed!
Commits: v0.12.0-alpha...v0.13.0-alpha
v0.12.0-alpha
Added
- Adds support for using EXCLUDED within DML ON-CONFLICT-ACTION conditions. Closes #1111.
Changed
- Updates Kotlin target from 1.4 (DEPRECATED) to 1.6
- Moves PartiqlAst, PartiqlLogical, PartiqlLogicalResolved, and PartiqlPhysical (along with the transforms)
to a new project,partiql-ast
. These are still imported intopartiql-lang
with theapi
annotation. Therefore,
no action is required to consume the migrated classes. However, this now gives consumers of the AST, Experimental Plans,
Visitors, and VisitorTransforms the option of importing them directly using:org.partiql:partiql-ast:${VERSION}
.
The filepartiql.ion
is still published in thepartiql-lang-kotlin
JAR. - Moves internal class org.partiql.lang.syntax.PartiQLParser to org.partiql.lang.syntax.impl.PartiQLPigParser as we refactor for explicit API.
- Moves ANTLR grammar to
partiql-parser
package. The filesPartiQL.g4
andPartiQLTokens.g4
are still published in thepartiql-lang-kotlin
JAR. - Breaking: Adds new property,
rowAlias
, to experimentalPartiqlLogical.DmlOperation.DmlUpdate
,
PartiqlLogical.DmlOperation.DmlReplace
,PartiqlLogicalResolved.DmlOperation.DmlUpdate
,
PartiqlLogicalResolved.DmlOperation.DmlReplace
,PartiqlPhysical.DmlOperation.DmlUpdate
, and
PartiqlPhysical.DmlOperation.DmlReplace
.
Deprecated
Fixed
Removed
-
Breaking: Removes deprecated
org.partiql.annotations.PartiQLExperimental
-
Breaking: Removes deprecated/unused
blacklist()
anddenyList()
fromorg.partiql.lang.eval
-
Breaking: Removes deprecated enum
LEGACY
inorg.partiql.lang.eval.CompileOptions
-
Breaking: Removes deprecated
org.partiql.lang.eval.ExprValueFactory
, as well as all methods that had its instance
among arguments. The counterparts of these methods without an ExprValueFactory are still available. The affected methods
include:ofIonStruct()
inorg.partiql.lang.eval.Bindings
, a constructor oforg.partiql.lang.CompilerPipeline
,
convert()
inorg.partiql.lang.eval.io.DelimitedValues.ConversionMode
,exprValue()
from
org.partiql.lang.eval.io.DelimitedValues
, a constructor fororg.partiql.lang.eval.physical.EvaluatorState
, and
valueFactory
,build
,builder
,standard
inorg.partiql.lang.CompilerPipeline
-
Breaking: Removes deprecated
org.partiql.lang.eval.visitors.GroupKeyReferencesVisitorTransform
-
Breaking: Removes
org.partiql.lang.mappers.StaticTypeMapper
-
Breaking: Removes
org.partiql.lang.mappers.IonSchemaMapper
-
Breaking: Removes
org.partiql.lang.mappers.TypeNotFoundException
-
Breaking: Removes
org.partiql.lang.mappers.getBaseTypeName()
-
Breaking: Removes unused/deprecated enums
KEYWORD
,TOKEN_TYPE
,EXPECTED_TOKEN_TYPE
,EXPECTED_TOKEN_TYPE_1_OF_2
,
EXPECTED_TOKEN_TYPE_2_OF_2
,TIMESTAMP_STRING
,NARY_OP
fromorg.partiql.lang.errors.Property
-
Breaking: Removes unused
tokenTypeValue()
fromorg.partiql.lang.errors.PropertyValue
-
Breaking: Removes unused
TOKEN_CLASS
fromorg.partiql.lang.errors.PropertyType
-
Breaking: Removes unused
set(Property, TokenType)
fromorg.partiql.lang.errors.PropertyValueMap
-
Breaking: Removes unused/deprecated enums
LEXER_INVALID_NAME
,LEXER_INVALID_OPERATOR
,LEXER_INVALID_ION_LITERAL
,
PARSE_EXPECTED_KEYWORD
,PARSE_EXPECTED_TOKEN_TYPE
,PARSE_EXPECTED_2_TOKEN_TYPES
,PARSE_EXPECTED_TYPE_NAME
,
PARSE_EXPECTED_WHEN_CLAUSE
,PARSE_EXPECTED_WHERE_CLAUSE
,PARSE_EXPECTED_CONFLICT_ACTION
,PARSE_EXPECTED_RETURNING_CLAUSE
,
PARSE_UNSUPPORTED_RETURNING_CLAUSE_SYNTAX
,PARSE_UNSUPPORTED_TOKEN
,PARSE_EXPECTED_MEMBER
,PARSE_UNSUPPORTED_SELECT
,
PARSE_UNSUPPORTED_CASE
,PARSE_UNSUPPORTED_CASE_CLAUSE
,PARSE_UNSUPPORTED_ALIAS
,PARSE_UNSUPPORTED_SYNTAX
,
PARSE_UNSUPPORTED_SYNTAX
,PARSE_INVALID_PATH_COMPONENT
,PARSE_MISSING_IDENT_AFTER_AT
,PARSE_UNEXPECTED_OPERATOR
,
PARSE_UNEXPECTED_TERM
,PARSE_UNEXPECTED_KEYWORD
,PARSE_EXPECTED_EXPRESSION
,PARSE_EXPECTED_LEFT_PAREN_AFTER_CAST
,
PARSE_EXPECTED_LEFT_PAREN_VALUE_CONSTRUCTOR
,PARSE_EXPECTED_LEFT_PAREN_BUILTIN_FUNCTION_CALL
,
PARSE_EXPECTED_RIGHT_PAREN_BUILTIN_FUNCTION_CALL
,PARSE_EXPECTED_ARGUMENT_DELIMITER
,PARSE_CAST_ARITY
,
PARSE_INVALID_TYPE_PARAM
,PARSE_EMPTY_SELECT
,PARSE_SELECT_MISSING_FROM
,PARSE_MISSING_OPERATION
,
PARSE_MISSING_SET_ASSIGNMENT
,PARSE_EXPECTED_IDENT_FOR_GROUP_NAME
,PARSE_EXPECTED_IDENT_FOR_ALIAS
,
PARSE_EXPECTED_KEYWORD_FOR_MATCH
,PARSE_EXPECTED_IDENT_FOR_MATCH
,PARSE_EXPECTED_LEFT_PAREN_FOR_MATCH_NODE
,
PARSE_EXPECTED_RIGHT_PAREN_FOR_MATCH_NODE
,PARSE_EXPECTED_LEFT_BRACKET_FOR_MATCH_EDGE
,
PARSE_EXPECTED_RIGHT_BRACKET_FOR_MATCH_EDGE
,PARSE_EXPECTED_PARENTHESIZED_PATTERN
,PARSE_EXPECTED_EDGE_PATTERN_MATCH_EDGE
,
PARSE_EXPECTED_EQUALS_FOR_MATCH_PATH_VARIABLE
,PARSE_EXPECTED_AS_FOR_LET
,PARSE_UNSUPPORTED_CALL_WITH_STAR
,
PARSE_NON_UNARY_AGREGATE_FUNCTION_CALL
,PARSE_NO_STORED_PROCEDURE_PROVIDED
,PARSE_MALFORMED_JOIN
,
PARSE_EXPECTED_IDENT_FOR_AT
,PARSE_INVALID_CONTEXT_FOR_WILDCARD_IN_SELECT_LIST
,
PARSE_CANNOT_MIX_SQB_AND_WILDCARD_IN_SELECT_LIST
,PARSE_ASTERISK_IS_NOT_ALONE_IN_SELECT_LIST
,
SEMANTIC_DUPLICATE_ALIASES_IN_SELECT_LIST_ITEM
,SEMANTIC_NO_SUCH_FUNCTION
,SEMANTIC_INCORRECT_ARGUMENT_TYPES_TO_FUNC_CALL
,
EVALUATOR_NON_TEXT_STRUCT_KEY
,SEMANTIC_INCORRECT_NODE_ARITY
,SEMANTIC_ASTERISK_USED_WITH_OTHER_ITEMS
,
getKeyword()
fromorg.partiql.lang.errors.ErrorCode
-
Breaking: Removes unused
fillErrorContext()
fromorg.partiql.lang.eval
-
Breaking: Removes deprecated
isNull()
fromorg.partiql.lang.eval.ExprValueType
-
Breaking: Remove unused
fromTypeName()
,fromSqlDataType()
,fromSqlDataTypeOrNull()
fromorg.partiql.lang.eval.ExprValueType
-
Breaking: Removes deprecated
org.partiql.lang.syntax.Lexer
-
Breaking: Removes unused
STANDARD_AGGREGATE_FUNCTIONS
,OperatorPrecedenceGroups
fromorg.partiql.lang.syntax
-
Breaking: Removes deprecated
org.partiql.lang.syntax.SourcePosition
-
Breaking: Removes deprecated
org.partiql.lang.syntax.SourceSpan
-
Breaking: Removes deprecated
org.partiql.lang.syntax.Token
-
Breaking: Removes deprecated
org.partiql.lang.syntax.TokenType
-
Breaking: Stops publishing PartiQL ISL to Maven Central. The last published version is https://central.sonatype.com/artifact/org.partiql/partiql-isl-kotlin/0.11.0
-
Breaking: Removes unused package
org.partiql.lang.schemadiscovery
which included unused classes of:
SchemaInferencerFromExample
,SchemaInferencerFromExampleImpl
,TypeConstraint
,NormalizeNullableVisitorTransform
,
NormalizeDecimalPrecisionsToUpToRange
, andIonExampleParser
. -
Breaking: Removes unused package
org.partiql.lang.partiqlisl
which includes unused classes/methods:ResourceAuthority
,
getResourceAuthority()
, andloadPartiqlIsl()
. -
Breaking: Plan nodes cannot be directly instantiated. To instantiate, use the
Plan
(DEFAULT) factory. -
Breaking: PlanRewriter has been moved from
org.partiql.plan.visitor.PlanRewriter
toorg.partiql.plan.util.PlanRewriter
Security
Contributors
Thank you to all who have contributed!
Commits: v0.11.0-alpha...v0.12.0-alpha
v0.11.0-alpha
Added
- Adds an initial implementation of GPML (Graph Pattern Matching Language), following
PartiQL RFC-0025
and RFC-0033.
This initial implementation includes:- A file format for external graphs, defined as a schema in ISL (Ion Schema Language),
as well as an in-memory graph data model and a reader for loading external graphs into it. - CLI shell commands
!add_graph
and!add_graph_from_file
for bringing
externally-defined graphs into the evaluation environment. - Evaluation of straight-path patterns with simple label matching and
all directed/undirected edge patterns.
- A file format for external graphs, defined as a schema in ISL (Ion Schema Language),
- Adds new
TupleConstraint
variant,Ordered
, to represent ordering inStructType
. See the KDoc for more information.
Changed
- Breaking: The
fields
attribute oforg.partiql.types.StructType
is no longer aMap<String, StaticType>
. It is
now aList<org.partiql.types.StructType.Field>
, whereField
contains akey (String)
andvalue (StaticType)
. This
is to allow duplicates within theStructType
.
Deprecated
- None
Fixed
- Fixes the ability for JOIN predicates to access the FROM source aliases and corresponding attributes.
Removed
- None
Security
- None
Comparison
Comparing v0.10.0 - v0.11.0
Contributors
Thank you to all who have contributed!