Skip to content

Commit

Permalink
typelevel#804 - encoding for Set derivatives as well - test build, 2.…
Browse files Browse the repository at this point in the history
…13 forced changes, compilation issue with toSeq():GenSeq
  • Loading branch information
chris-twiner committed Mar 20, 2024
1 parent e7881c0 commit 594fceb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dataset/src/test/scala/frameless/EncoderTests.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package frameless

import scala.collection.immutable.{ListSet, Set, TreeSet}
import scala.collection.immutable.{ ListSet, Set, TreeSet }
import org.scalatest.matchers.should.Matchers

object EncoderTests {
Expand Down Expand Up @@ -34,7 +34,11 @@ class EncoderTests extends TypedDatasetSuite with Matchers {
implicitly[TypedEncoder[PeriodRow]]
}

def performCollection[C[X] <: Iterable[X]](toType: Seq[X1[Int]] => C[X1[Int]])(implicit ce: TypedEncoder[C[X1[Int]]]): (Unit,Unit) = evalCodeGens {
def performCollection[C[X] <: Iterable[X]](
toType: Seq[X1[Int]] => C[X1[Int]]
)(implicit
ce: TypedEncoder[C[X1[Int]]]
): (Unit, Unit) = evalCodeGens {

implicit val cte = TypedExpressionEncoder[C[X1[Int]]]
implicit val e = implicitly[TypedEncoder[ContainerOf[C]]]
Expand Down Expand Up @@ -65,7 +69,8 @@ class EncoderTests extends TypedDatasetSuite with Matchers {
// only needed for 2.12
implicit val ordering = new Ordering[X1[Int]] {
val intordering = implicitly[Ordering[Int]]
override def compare(x: X1[Int], y: X1[Int]): Int = intordering.compare(x.a, y.a)
override def compare(x: X1[Int], y: X1[Int]): Int =
intordering.compare(x.a, y.a)
}

performCollection[TreeSet](TreeSet.newBuilder.++=(_).result())
Expand Down

0 comments on commit 594fceb

Please sign in to comment.