Skip to content

Commit

Permalink
Preparing bugfix release
Browse files Browse the repository at this point in the history
  • Loading branch information
mjakubowski84 committed Nov 12, 2023
1 parent a021d7a commit 8ab1270
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Expand Up @@ -14,8 +14,8 @@ val akkaLib = ActorLibCross("-akka", "-akka")
val pekkoLib = ActorLibCross("-pekko", "-pekko")

ThisBuild / organization := "com.github.mjakubowski84"
ThisBuild / version := "2.15.0-SNAPSHOT"
ThisBuild / isSnapshot := true
ThisBuild / version := "2.14.1"
ThisBuild / isSnapshot := false
ThisBuild / scalaVersion := twoThirteen

ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
Expand Down
Expand Up @@ -152,7 +152,8 @@ abstract private class RowParquetRecordConverter(schema: GroupType)
private class RootRowParquetRecordConverter(schema: GroupType, columnProjections: Seq[ColumnProjection])
extends RowParquetRecordConverter(schema) {

private lazy val emptyProjectionRow = RowParquetRecord.emptyWithSchema(columnProjections.map(cp => cp.alias.getOrElse(cp.columnPath.elements.last)))
private lazy val emptyProjectionRow =
RowParquetRecord.emptyWithSchema(columnProjections.map(cp => cp.alias.getOrElse(cp.columnPath.elements.last)))

override def end(): Unit =
if (columnProjections.nonEmpty) {
Expand Down
Expand Up @@ -24,8 +24,8 @@ object Message {
Types.buildMessage().addFields(fields*).named(name.getOrElse(DefaultName))

/** Merges the fields before creating a schema. Merge is done by unifying types of columns that are defined in a
* projection more than once. The first mentioned column of primitive type is chosen in the case of duplicates.
* Union of of member fields is executed in the case of complex types.
* projection more than once. The first mentioned column of primitive type is chosen in the case of duplicates. Union
* of of member fields is executed in the case of complex types.
* @param fields
* fields to be merged and then used for defining the schema
* @return
Expand All @@ -41,7 +41,7 @@ object Message {
register.get(fieldName) match {
case Some(group: GroupType) if !tpe.isPrimitive() =>
val newMemberFields = mergeFields(group.getFields().asScala.toSeq ++ tpe.asGroupType().getFields().asScala)
val mergedGroup = group.withNewFields(newMemberFields.asJava)
val mergedGroup = group.withNewFields(newMemberFields.asJava)
register.updated(fieldName, mergedGroup) -> (merged.filterNot(_ == group) :+ mergedGroup)
case Some(firstSeen) =>
register -> (merged :+ firstSeen)
Expand Down

0 comments on commit 8ab1270

Please sign in to comment.