diff --git a/build.sbt b/build.sbt index dbcb3b2b..a4fc879c 100644 --- a/build.sbt +++ b/build.sbt @@ -5,8 +5,8 @@ lazy val supportedScalaVersions = Seq("2.11.12", "2.12.13", "2.13.5") lazy val fs2ScalaVersions = Seq("2.12.13", "2.13.5") ThisBuild / organization := "com.github.mjakubowski84" -ThisBuild / version := "1.9.0-SNAPSHOT" -ThisBuild / isSnapshot := true +ThisBuild / version := "1.8.1" +ThisBuild / isSnapshot := false ThisBuild / scalaVersion := "2.12.13" ThisBuild / scalacOptions ++= Seq("-deprecation", "-target:jvm-1.8") ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-unchecked", "-deprecation", "-feature") diff --git a/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetRecord.scala b/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetRecord.scala index db2dfc02..57c7666d 100644 --- a/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetRecord.scala +++ b/core/src/main/scala/com/github/mjakubowski84/parquet4s/ParquetRecord.scala @@ -332,6 +332,7 @@ object ListParquetRecord { private val ListFieldName = "list" private val ElementFieldName = "element" private val LegacyElementFieldName = "array" + private val ElementNames = Set(ElementFieldName, LegacyElementFieldName) /** * @param elements to init the record with @@ -363,8 +364,7 @@ class ListParquetRecord private extends ParquetRecord[Value] with mutable.Seq[Va override def add(name: String, value: Value): This = value match { - case repeated: RowParquetRecord if - repeated.length==1 && Set(ElementFieldName, LegacyElementFieldName).contains(repeated.head._1) => + case repeated: RowParquetRecord if repeated.length == 1 && ElementNames.contains(repeated.head._1) => add(repeated.head._2) case repeated: RowParquetRecord if repeated.isEmpty => add(NullValue)