diff --git a/CHANGELOG.md b/CHANGELOG.md index e51ae4a284..d9e6627082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,10 @@ Thank you to all who have contributed! - The current SqlBlock, SqlDialect, and SqlLayout are marked as deprecated and will be slightly changed in the next release. ### Fixed +- `StaticType.flatten()` on an `AnyOfType` with `AnyType` will return `AnyType` - Updates the default `.sql()` method to use a more efficient (internal) printer implementation. + ### Removed ### Security @@ -47,6 +49,7 @@ Thank you to all who have contributed! Thank you to all who have contributed! - @ - @rchowell +- @alancai98 ## [0.14.4] diff --git a/partiql-types/src/main/kotlin/org/partiql/types/StaticType.kt b/partiql-types/src/main/kotlin/org/partiql/types/StaticType.kt index df77f42f6f..66749a4c50 100644 --- a/partiql-types/src/main/kotlin/org/partiql/types/StaticType.kt +++ b/partiql-types/src/main/kotlin/org/partiql/types/StaticType.kt @@ -630,7 +630,7 @@ public data class AnyOfType(val types: Set, override val metas: Map< types = this.types.flatMap { when (it) { is SingleType -> listOf(it) - is AnyType -> listOf(it) + is AnyType -> return@flatten it // if `AnyType`, return `AnyType` is AnyOfType -> it.types } }.toSet()