Skip to content

Commit 4ff50ed

Browse files
authored
Merge 28d226a into 5f16e67
2 parents 5f16e67 + 28d226a commit 4ff50ed

File tree

138 files changed

+10301
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+10301
-636
lines changed

CHANGELOG.md

Lines changed: 92 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,78 @@ This is a pre-release containing:
5151

5252
Please note that these changes are subject to future breaking changes without warning.
5353

54+
## [0.14.4]
55+
56+
### Added
57+
- Added constrained decimal as valid parameter type to functions that take in numeric parameters.
58+
- Added async version of physical plan evaluator `PartiQLCompilerAsync`.
59+
- The following related async APIs have been added:
60+
- `org.partiql.lang.compiler` -- `PartiQLCompilerAsync`, `PartiQLCompilerAsyncBuilder`, `PartiQLCompilerAsyncDefault`, `PartiQLCompilerPipelineAsync`
61+
- `org.partiql.lang.eval` -- `PartiQLStatementAsync`
62+
- `org.partiql.lang.eval.physical` -- `VariableBindingAsync`
63+
- `org.partiql.lang.eval.physical.operators` -- `AggregateOperatorFactoryAsync`, `CompiledGroupKeyAsync`, `CompiledAggregateFunctionAsync`, `FilterRelationalOperatorFactoryAsync`, `JoinRelationalOperatorFactoryAsync`, `LetRelationalOperatorFactoryAsync`, `LimitRelationalOperatorFactoryAsync`, `OffsetRelationalOperatorFactoryAsync`, `ProjectRelationalOperatorFactoryAsync`, `RelationExpressionAsync`, `ScanRelationalOperatorFactoryAsync`, `SortOperatorFactoryAsync`, `CompiledSortKeyAsync`, `UnpivotOperatorFactoryAsync`, `ValueExpressionAsync`, `WindowRelationalOperatorFactoryAsync`, `CompiledWindowFunctionAsync`
64+
- `org.partiql.lang.eval.physical.window` -- `NavigationWindowFunctionAsync`, `WindowFunctionAsync`
65+
- Overall, we see about a 10-20% performance decline in running a single query on the synchronous vs async evaluator
66+
- JMH benchmarks added to partiql-lang: `PartiQLCompilerPipelineBenchmark` and `PartiQLCompilerPipelineAsyncBenchmark`
67+
68+
### Changed
69+
- Function resolution logic: Now the function resolver would match all possible candidate(based on if the argument can be coerced to the Signature parameter type). If there are multiple match it will first attempt to pick the one requires the least cast, then pick the function with the highest precedence.
70+
- partiql-cli -- experimental version of CLI now uses the async physical plan evaluator
71+
72+
### Deprecated
73+
- As part of the additions to make an async physical plan evaluator, the synchronous physical plan evaluator `PartiQLCompiler` has been deprecated.
74+
- The following related APIs have been deprecated
75+
- `org.partiql.lang.compiler` -- `PartiQLCompiler`, `PartiQLCompilerBuilder`, `PartiQLCompilerDefault`, `PartiQLCompilerPipeline`
76+
- `org.partiql.lang.eval` -- `PartiQLStatement`
77+
- `org.partiql.lang.eval.physical` -- `VariableBinding`
78+
- `org.partiql.lang.eval.physical.operators` -- `AggregateOperatorFactory`, `CompiledGroupKey`, `CompiledAggregateFunction`, `FilterRelationalOperatorFactory`, `JoinRelationalOperatorFactory`, `LetRelationalOperatorFactory`, `LimitRelationalOperatorFactory`, `OffsetRelationalOperatorFactory`, `ProjectRelationalOperatorFactory`, `RelationExpression`, `ScanRelationalOperatorFactory`, `SortOperatorFactory`, `CompiledSortKey`, `UnpivotOperatorFactory`, `ValueExpression`, `WindowRelationalOperatorFactory`, `CompiledWindowFunction`
79+
- `org.partiql.lang.eval.physical.window` -- `NavigationWindowFunction`, `WindowFunction`
80+
81+
### Fixed
82+
- partiql-ast: `SqlDialect` will wrap unary ops (`NOT`, `+`, `-`) in parens
83+
84+
### Removed
85+
86+
### Security
87+
88+
### Contributors
89+
Thank you to all who have contributed!
90+
- @yliuuuu
91+
- @alancai98
92+
93+
## [0.14.3] - 2024-02-14
94+
95+
### Fixed
96+
- Return type of `partiql-ast`'s `SqlDialect` for `defaultReturn` to be a `SqlBlock` rather than `Nothing`
97+
- Flatten `CASE WHEN` branch type in `PlanTyper`
98+
5499
### Contributors
55100
Thank you to all who have contributed!
56101
- @alancai98
57102
- @johnedquinn
58103
- @RCHowell
59104
- @yliuuuu
60105

106+
## [0.14.2] - 2024-01-25
107+
108+
### Added
109+
110+
### Changed
111+
- Upgrade IonJava dependency to v1.11.1
112+
113+
### Deprecated
114+
115+
### Fixed
116+
117+
### Removed
118+
119+
### Security
120+
121+
### Contributors
122+
Thank you to all who have contributed!
123+
- @RCHowell
124+
- @alancai98
125+
61126
## [0.14.1] - 2024-01-03
62127

63128
### Added
@@ -87,29 +152,30 @@ Thank you to all who have contributed!
87152
- Adds top-level IR node creation functions.
88153
- Adds `componentN` functions (destructuring) to IR nodes via Kotlin data classes
89154
- Adds public `tag` field to IR nodes for associating metadata
90-
- Adds AST Normalization Pass.
91-
- Adds PartiQLPlanner Interface, which is responsible for translate an AST to a Plan.
155+
- Adds AST Normalization Pass.
156+
- Adds PartiQLPlanner Interface, which is responsible for translate an AST to a Plan.
92157
- **EXPERIMENTAL** Evaluation of `EXCLUDE` in the `EvaluatingCompiler`
93158
- This is currently marked as experimental until the RFC is approved https://github.com/partiql/partiql-lang/issues/27
94159
- This will be added to the `PhysicalPlanCompiler` in an upcoming release
95160
- **EXPERIMENTAL**: Adds support for EXCLUDE in the default SqlDialect.
96161

97162
### Changed
98163
- StaticTypeInferencer and PlanTyper will not raise an error when an expression is inferred to `NULL` or `unionOf(NULL, MISSING)`. In these cases the StaticTypeInferencer and PlanTyper will still raise the Problem Code `ExpressionAlwaysReturnsNullOrMissing` but the severity of the problem has been changed to warning. In the case an expression always returns `MISSING`, problem code `ExpressionAlwaysReturnsMissing` will be raised, which will have problem severity of error.
99-
- **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.
100-
- **BREAKING** `PartiQLValueType` now distinguishes between Arbitrary Precision Decimal and Fixed Precision Decimal.
101-
- **BREAKING** Function Signature Changes. Now Function signature has two subclasses, `Scalar` and `Aggregation`.
164+
- **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.
165+
- **BREAKING** `PartiQLValueType` now distinguishes between Arbitrary Precision Decimal and Fixed Precision Decimal.
166+
- **BREAKING** Function Signature Changes. Now Function signature has two subclasses, `Scalar` and `Aggregation`.
102167
- **BREAKING** Plugin Changes. Only return one Connector.Factory, use Kotlin fields. JVM signature remains the same.
103-
- **BREAKING** In the produced plan:
168+
- **BREAKING** In the produced plan:
104169
- The new plan is fully resolved and typed.
105-
- Operators will be converted to function call.
170+
- Operators will be converted to function call.
106171
- Changes the return type of `filter_distinct` to a list if input collection is list
107172
- Changes the `PartiQLValue` collections to implement Iterable rather than Sequence, allowing for multiple consumption.
108173
- **BREAKING** Moves PartiQLParserBuilder.standard().build() to be PartiQLParser.default().
109174
- **BREAKING** Changed modeling of `EXCLUDE` in `partiql-ast`
110175

111176
### Deprecated
112177

178+
113179
### Fixed
114180
- Fixes the CLI hanging on invalid queries. See issue #1230.
115181
- Fixes Timestamp Type parsing issue. Previously Timestamp Type would get parsed to a Time type.
@@ -119,7 +185,7 @@ Thank you to all who have contributed!
119185
### Removed
120186
- **Breaking** Removed IR factory in favor of static top-level functions. Change `Ast.foo()`
121187
to `foo()`
122-
- **Breaking** Removed `org.partiql.lang.planner.transforms.AstToPlan`. Use `org.partiql.planner.PartiQLPlanner`.
188+
- **Breaking** Removed `org.partiql.lang.planner.transforms.AstToPlan`. Use `org.partiql.planner.PartiQLPlanner`.
123189
- **Breaking** Removed `org.partiql.lang.planner.transforms.PartiQLSchemaInferencer`. In order to achieve the same functionality, one would need to use the `org.partiql.planner.PartiQLPlanner`.
124190
- To get the inferred type of the query result, one can do: `(plan.statement as Statement.Query).root.type`
125191

@@ -198,7 +264,7 @@ Thank you to all who have contributed!
198264
- Parsing of label patterns within node and edge graph patterns now supports
199265
disjunction `|`, conjunction `&`, negation `!`, and grouping.
200266
- Adds default `equals` and `hashCode` methods for each generated abstract class of Sprout. This affects the generated
201-
classes in `:partiql-ast` and `:partiql-plan`.
267+
classes in `:partiql-ast` and `:partiql-plan`.
202268
- Adds README to `partiql-types` package.
203269
- Initializes PartiQL's Code Coverage library
204270
- Adds support for BRANCH and BRANCH-CONDITION Coverage
@@ -240,12 +306,12 @@ classes in `:partiql-ast` and `:partiql-plan`.
240306
- Introduces `isNullCall` and `isNullable` properties to FunctionSignature.
241307
- Removed `Nullable...Value` implementations of PartiQLValue and made the standard implementations nullable.
242308
- Using PartiQLValueType requires optin; this was a miss from an earlier commit.
243-
- Modified timestamp static type to model precision and time zone.
309+
- Modified timestamp static type to model precision and time zone.
244310

245311
### Deprecated
246-
- **Breaking**: Deprecates the `Arguments`, `RequiredArgs`, `RequiredWithOptional`, and `RequiredWithVariadic` classes,
247-
along with the `callWithOptional()`, `callWithVariadic()`, and the overloaded `call()` methods in the `ExprFunction` class,
248-
marking them with a Deprecation Level of ERROR. Now, it's recommended to use
312+
- **Breaking**: Deprecates the `Arguments`, `RequiredArgs`, `RequiredWithOptional`, and `RequiredWithVariadic` classes,
313+
along with the `callWithOptional()`, `callWithVariadic()`, and the overloaded `call()` methods in the `ExprFunction` class,
314+
marking them with a Deprecation Level of ERROR. Now, it's recommended to use
249315
`call(session: EvaluationSession, args: List<ExprValue>)` and `callWithRequired()` instead.
250316
- **Breaking**: Deprecates `optionalParameter` and `variadicParameter` in the `FunctionSignature` with a Deprecation
251317
Level of ERROR. Please use multiple implementations of ExprFunction and use the LIST ExprValue to
@@ -281,7 +347,7 @@ Thank you to all who have contributed!
281347
- Moves PartiqlAst, PartiqlLogical, PartiqlLogicalResolved, and PartiqlPhysical (along with the transforms)
282348
to a new project, `partiql-ast`. These are still imported into `partiql-lang` with the `api` annotation. Therefore,
283349
no action is required to consume the migrated classes. However, this now gives consumers of the AST, Experimental Plans,
284-
Visitors, and VisitorTransforms the option of importing them directly using: `org.partiql:partiql-ast:${VERSION}`.
350+
Visitors, and VisitorTransforms the option of importing them directly using: `org.partiql:partiql-ast:${VERSION}`.
285351
The file `partiql.ion` is still published in the `partiql-lang-kotlin` JAR.
286352
- Moves internal class org.partiql.lang.syntax.PartiQLParser to org.partiql.lang.syntax.impl.PartiQLPigParser as we refactor for explicit API.
287353
- Moves ANTLR grammar to `partiql-parser` package. The files `PartiQL.g4` and `PartiQLTokens.g4` are still published in the `partiql-lang-kotlin` JAR.
@@ -366,15 +432,15 @@ Thank you to all who have contributed!
366432

367433
### Added
368434

369-
- Adds an initial implementation of GPML (Graph Pattern Matching Language), following
370-
PartiQL [RFC-0025](https://github.com/partiql/partiql-docs/blob/main/RFCs/0025-graph-data-model.md)
435+
- Adds an initial implementation of GPML (Graph Pattern Matching Language), following
436+
PartiQL [RFC-0025](https://github.com/partiql/partiql-docs/blob/main/RFCs/0025-graph-data-model.md)
371437
and [RFC-0033](https://github.com/partiql/partiql-docs/blob/main/RFCs/0033-graph-query.md).
372438
This initial implementation includes:
373-
- A file format for external graphs, defined as a schema in ISL (Ion Schema Language),
439+
- A file format for external graphs, defined as a schema in ISL (Ion Schema Language),
374440
as well as an in-memory graph data model and a reader for loading external graphs into it.
375-
- CLI shell commands `!add_graph` and `!add_graph_from_file` for bringing
376-
externally-defined graphs into the evaluation environment.
377-
- Evaluation of straight-path patterns with simple label matching and
441+
- CLI shell commands `!add_graph` and `!add_graph_from_file` for bringing
442+
externally-defined graphs into the evaluation environment.
443+
- Evaluation of straight-path patterns with simple label matching and
378444
all directed/undirected edge patterns.
379445
- Adds new `TupleConstraint` variant, `Ordered`, to represent ordering in `StructType`. See the KDoc for more information.
380446

@@ -484,7 +550,7 @@ breaking changes if migrating from v0.9.2. The breaking changes accidentally int
484550
### Added
485551
- Adds ability to pipe queries to the CLI.
486552
- Adds ability to run PartiQL files as executables by adding support for shebangs.
487-
- Adds experimental syntax for CREATE TABLE, towards addressing
553+
- Adds experimental syntax for CREATE TABLE, towards addressing
488554
[#36](https://github.com/partiql/partiql-docs/issues/36) of specifying PartiQL DDL.
489555

490556
### Changed
@@ -984,7 +1050,11 @@ breaking changes if migrating from v0.9.2. The breaking changes accidentally int
9841050
### Added
9851051
Initial alpha release of PartiQL.
9861052

987-
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.1...HEAD
1053+
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.5...HEAD
1054+
[0.14.5]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.4...v0.14.5
1055+
[0.14.4]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.3...v0.14.4
1056+
[0.14.3]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.2...v0.14.3
1057+
[0.14.2]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.1...v0.14.2
9881058
[0.14.1]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.0-alpha...v0.14.1
9891059
[0.14.0-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.2-alpha...v0.14.0-alpha
9901060
[0.13.2-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.1-alpha...v0.13.2-alpha

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This project is published to [Maven Central](https://search.maven.org/artifact/o
3131

3232
| Group ID | Artifact ID | Recommended Version |
3333
|---------------|-----------------------|---------------------|
34-
| `org.partiql` | `partiql-lang-kotlin` | `0.14.1` |
34+
| `org.partiql` | `partiql-lang-kotlin` | `0.14.4` |
3535

3636

3737
For Maven builds, add the following to your `pom.xml`:

buildSrc/src/main/kotlin/partiql.versions.kt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,24 @@ object Versions {
3131
const val gson = "2.10.1"
3232
const val guava = "31.1-jre"
3333
const val ionElement = "1.0.0"
34-
const val ionJava = "1.10.2"
34+
const val ionJava = "1.11.1"
3535
const val ionSchema = "1.2.1"
3636
const val jansi = "2.4.0"
3737
const val jgenhtml = "1.6"
3838
const val jline = "3.21.0"
39-
const val jmh = "0.5.3"
39+
const val jmhGradlePlugin = "0.5.3"
40+
const val jmhCore = "1.37"
41+
const val jmhGeneratorAnnprocess = "1.37"
42+
const val jmhGeneratorBytecode = "1.37"
4043
const val joda = "2.12.1"
4144
const val kotlinPoet = "1.11.0"
4245
const val kotlinxCollections = "0.3.5"
4346
const val picoCli = "4.7.0"
4447
const val kasechange = "1.3.0"
4548
const val ktlint = "11.6.0"
4649
const val pig = "0.6.2"
50+
const val kotlinxCoroutines = "1.6.0"
51+
const val kotlinxCoroutinesJdk8 = "1.6.0"
4752

4853
// Testing
4954
const val assertj = "3.11.0"
@@ -54,6 +59,7 @@ object Versions {
5459
const val junit4Params = "1.1.1"
5560
const val mockito = "4.5.0"
5661
const val mockk = "1.11.0"
62+
const val kotlinxCoroutinesTest = "1.6.0"
5763
}
5864

5965
object Deps {
@@ -84,6 +90,8 @@ object Deps {
8490
const val picoCli = "info.picocli:picocli:${Versions.picoCli}"
8591
const val pig = "org.partiql:partiql-ir-generator:${Versions.pig}"
8692
const val pigRuntime = "org.partiql:partiql-ir-generator-runtime:${Versions.pig}"
93+
const val kotlinxCoroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinxCoroutines}"
94+
const val kotlinxCoroutinesJdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${Versions.kotlinxCoroutinesJdk8}"
8795

8896
// Testing
8997
const val assertj = "org.assertj:assertj-core:${Versions.assertj}"
@@ -97,6 +105,12 @@ object Deps {
97105
const val kotlinTestJunit = "org.jetbrains.kotlin:kotlin-test-junit5:${Versions.kotlin}"
98106
const val mockito = "org.mockito:mockito-junit-jupiter:${Versions.mockito}"
99107
const val mockk = "io.mockk:mockk:${Versions.mockk}"
108+
const val kotlinxCoroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.kotlinxCoroutinesTest}"
109+
110+
// JMH Benchmarking
111+
const val jmhCore = "org.openjdk.jmh:jmh-core:${Versions.jmhCore}"
112+
const val jmhGeneratorAnnprocess = "org.openjdk.jmh:jmh-core:${Versions.jmhGeneratorAnnprocess}"
113+
const val jmhGeneratorBytecode = "org.openjdk.jmh:jmh-core:${Versions.jmhGeneratorBytecode}"
100114
}
101115

102116
object Plugins {
@@ -114,4 +128,4 @@ object Plugins {
114128
const val ktlint = "org.jlleitschuh.gradle.ktlint"
115129
const val library = "org.gradle.java-library"
116130
const val testFixtures = "org.gradle.java-test-fixtures"
117-
}
131+
}

examples/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ dependencies {
2626
implementation(project(":partiql-lang"))
2727
implementation(project(":partiql-eval"))
2828
implementation(project(":partiql-types"))
29+
implementation(Deps.kotlinxCoroutines)
30+
implementation(Deps.kotlinxCoroutinesJdk8)
2931
implementation(Deps.awsSdkS3)
3032
}
3133

0 commit comments

Comments
 (0)