Skip to content

Commit

Permalink
#803 - stream
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-twiner committed Mar 21, 2024
1 parent 08d7c3d commit e157cdb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dataset/src/main/scala/frameless/TypedEncoder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,13 @@ object TypedEncoder {
object CollectionConversion {

implicit def seqToSeq[Y] = new CollectionConversion[Seq, Seq, Y] {
override def convert(c: Seq[Y]): Seq[Y] = c

override def convert(c: Seq[Y]): Seq[Y] =
c match {
// Stream is produced
case _: Stream[Y] @unchecked => c.toVector.toSeq
case _ => c
}
}

implicit def seqToVector[Y] = new CollectionConversion[Seq, Vector, Y] {
Expand Down

0 comments on commit e157cdb

Please sign in to comment.