diff --git a/build.sbt b/build.sbt index e1f1afea..26eb2635 100644 --- a/build.sbt +++ b/build.sbt @@ -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") diff --git a/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetReadSupport.scala b/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetReadSupport.scala index 4e4c2188..c4dbda5a 100644 --- a/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetReadSupport.scala +++ b/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetReadSupport.scala @@ -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) { diff --git a/core/src/main/scala/com/github/mjakubowski84/parquet4s/Schema.scala b/core/src/main/scala/com/github/mjakubowski84/parquet4s/Schema.scala index 86778d4b..ff6c2bf5 100644 --- a/core/src/main/scala/com/github/mjakubowski84/parquet4s/Schema.scala +++ b/core/src/main/scala/com/github/mjakubowski84/parquet4s/Schema.scala @@ -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 @@ -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)