Skip to content

Commit 546a126

Browse files
authored
Prepare 0.14.8 release (#1554)
1 parent 945558c commit 546a126

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
Thank you to all who have contributed!
2424
-->
2525

26-
## [Unreleased]
26+
## [0.14.8]
2727

2828
### Added
2929

@@ -1110,7 +1110,8 @@ breaking changes if migrating from v0.9.2. The breaking changes accidentally int
11101110
### Added
11111111
Initial alpha release of PartiQL.
11121112

1113-
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.7...HEAD
1113+
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.8...HEAD
1114+
[0.14.8]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.7...v0.14.8
11141115
[0.14.7]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.6...v0.14.7
11151116
[0.14.6]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.5...v0.14.6
11161117
[0.14.5]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.4...v0.14.5

README.md

+1-1
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.6` |
34+
| `org.partiql` | `partiql-lang-kotlin` | `0.14.8` |
3535

3636

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

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=org.partiql
2-
version=0.14.8-SNAPSHOT
2+
version=0.14.8
33

44
ossrhUsername=EMPTY
55
ossrhPassword=EMPTY

partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/DynamicTyper.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ internal class DynamicTyper {
142142
// If a collection, then return union of all accumulated types as these coercion rules are not defined by SQL.
143143
STRUCT, BAG, LIST, SEXP -> return StaticType.unionOf(types + modifiers) to null
144144
DECIMAL -> {
145-
val type = computeDecimal()
145+
val type = computeConstrainedDecimal()
146146
// coercion required. fall back
147147
if (type == null) superT else return StaticType.unionOf(setOf(type) + modifiers).flatten() to null
148148
}
@@ -163,10 +163,11 @@ internal class DynamicTyper {
163163
}
164164
}
165165

166-
private fun computeDecimal(): DecimalType? {
166+
private fun computeConstrainedDecimal(): DecimalType? {
167167
val (precision, scale) = types.fold((0 to 0)) { acc, staticType ->
168168
val decimalType = staticType as? DecimalType ?: return null
169-
val constr = decimalType.precisionScaleConstraint as DecimalType.PrecisionScaleConstraint.Constrained
169+
val constr = decimalType.precisionScaleConstraint as? DecimalType.PrecisionScaleConstraint.Constrained
170+
?: throw IllegalStateException("Expected a constrained decimal type")
170171
val precision = max(constr.precision, acc.first)
171172
val scale = max(constr.scale, acc.second)
172173
precision to scale

0 commit comments

Comments
 (0)