Skip to content

Commit

Permalink
Release 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mjakubowski84 committed Apr 2, 2022
1 parent 0fa717a commit 3b8c4c2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ lazy val three = "3.1.1"
lazy val supportedScalaVersions = Seq(twoTwelve, twoThirteen, three)

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.mjakubowski84.parquet4s

import com.github.mjakubowski84.parquet4s.{TypedSchemaDef => TSD}
import org.apache.parquet.schema.*
import org.slf4j.LoggerFactory
import shapeless.*
Expand Down Expand Up @@ -35,9 +36,10 @@ trait ParquetSchemaResolver[T] {

object ParquetSchemaResolver {

type TypedSchemaDef[V] = com.github.mjakubowski84.parquet4s.TypedSchemaDef[V]
@deprecated("2.4.0", "use com.github.mjakubowski84.parquet4s.TypedSchemaDef directly instead")
type TypedSchemaDef[V] = TSD[V]

class TypedSchemaDefInvoker[V](val schema: TypedSchemaDef[V], fieldName: String) extends (() => Type) {
class TypedSchemaDefInvoker[V](val schema: TSD[V], fieldName: String) extends (() => Type) {
override def apply(): Type = schema(fieldName)
}

Expand Down Expand Up @@ -65,7 +67,7 @@ object ParquetSchemaResolver {

implicit def hcons[K <: Symbol, V, T <: HList](implicit
witness: Witness.Aux[K],
typedSchemaDef: TypedSchemaDef[V],
typedSchemaDef: TSD[V],
visitor: SchemaVisitor[V] = defaultSchemaVisitor[V],
rest: ParquetSchemaResolver[T]
): ParquetSchemaResolver[FieldType[K, V] :: T] =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.mjakubowski84.parquet4s

import com.github.mjakubowski84.parquet4s.{TypedSchemaDef => TSD}
import org.apache.parquet.schema.*
import org.slf4j.LoggerFactory
import shapeless.*
Expand Down Expand Up @@ -35,9 +36,10 @@ trait ParquetSchemaResolver[T] {

object ParquetSchemaResolver {

type TypedSchemaDef[V] = com.github.mjakubowski84.parquet4s.TypedSchemaDef[V]
@deprecated("2.4.0", "use com.github.mjakubowski84.parquet4s.TypedSchemaDef directly instead")
type TypedSchemaDef[V] = TSD[V]

class TypedSchemaDefInvoker[V](val schema: TypedSchemaDef[V], fieldName: String) extends (() => Type) {
class TypedSchemaDefInvoker[V](val schema: TSD[V], fieldName: String) extends (() => Type) {
override def apply(): Type = schema(fieldName)
}

Expand Down Expand Up @@ -65,7 +67,7 @@ object ParquetSchemaResolver {

implicit def hcons[K <: Symbol, V, T <: HList](implicit
witness: Witness.Aux[K],
typedSchemaDef: TypedSchemaDef[V],
typedSchemaDef: TSD[V],
visitor: SchemaVisitor[V] = defaultSchemaVisitor[V],
rest: ParquetSchemaResolver[T]
): ParquetSchemaResolver[FieldType[K, V] :: T] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ trait ParquetSchemaResolver[T]:

object ParquetSchemaResolver:

@deprecated("2.4.0", "use com.github.mjakubowski84.parquet4s.TypedSchemaDef directly instead")
type TypedSchemaDef[V] = TSD[V]

final abstract private[ParquetSchemaResolver] class Fields[Labels <: Tuple, Values <: Tuple]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object Message {

}

/** Defines Parquet schema. Produces Parquet [[Type]] for a field of given name.
/** Defines Parquet schema. Produces Parquet [[org.apache.parquet.schema.Type]] for a field of given name.
*/
trait SchemaDef {

Expand Down Expand Up @@ -187,7 +187,7 @@ private case class MapSchemaDef(key: Type, value: Type, required: Boolean, metad

}

/** [[SchemaDef]] for type [[V]].
/** [[SchemaDef]] for type `V`.
*/
trait TypedSchemaDef[V] extends SchemaDef {
private[parquet4s] def wrapped: SchemaDef
Expand Down
2 changes: 2 additions & 0 deletions site/docs/docs/fs2.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@ object Example extends IOApp.Simple {
}
```

> What differs FS2 from Akka is that for better performance FS2 processes stream elements in chunks. Therefore, `viaParquet` and `fromParquet` have `chunkSize` property that allow custom definition of the chunk size. Default value is `16`. Override the value to set up own balance between memory consumption and performance.
Please check [examples](https://github.com/mjakubowski84/parquet4s/tree/master/examples/src/main/scala/com/github/mjakubowski84/parquet4s/fs2) to learn more.

0 comments on commit 3b8c4c2

Please sign in to comment.