From 81a576d0c293309c318dc452d01122c0a44271f7 Mon Sep 17 00:00:00 2001 From: Alfonso Roa Date: Wed, 28 Feb 2024 15:26:22 +0100 Subject: [PATCH] Update scala 2.13 (#429) --- build.sbt | 2 +- core/src/main/scala/doric/syntax/DStructs.scala | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index 15e03ccec..1ed81fe19 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ val versionRegex = """^(.*)\.(.*)\.(.*)$""".r val versionRegexShort = """^(.*)\.(.*)$""".r val scala212 = "2.12.18" -val scala213 = "2.13.8" +val scala213 = "2.13.12" val parserSparkVersion: String => String = { case versionRegexShort("3", "0") => spark30Version diff --git a/core/src/main/scala/doric/syntax/DStructs.scala b/core/src/main/scala/doric/syntax/DStructs.scala index 86096d5a4..0a6bed109 100644 --- a/core/src/main/scala/doric/syntax/DStructs.scala +++ b/core/src/main/scala/doric/syntax/DStructs.scala @@ -1,18 +1,18 @@ package doric package syntax +import scala.jdk.CollectionConverters._ +import scala.language.dynamics + import cats.data.Kleisli -import cats.evidence.Is import cats.implicits._ import doric.sem.{ColumnTypeError, Location, SparkErrorWrapper} import doric.types.SparkType -import org.apache.spark.sql.catalyst.expressions.ExtractValue -import org.apache.spark.sql.{Column, Dataset, Row, functions => f} -import shapeless.labelled.FieldType import shapeless.{::, HList, LabelledGeneric, Witness} +import shapeless.labelled.FieldType -import scala.jdk.CollectionConverters._ -import scala.language.dynamics +import org.apache.spark.sql.{Column, Dataset, Row, functions => f} +import org.apache.spark.sql.catalyst.expressions.ExtractValue protected trait DStructs { @@ -131,7 +131,8 @@ protected trait DStructs { type V = _V } - implicit def Found[K <: Symbol, _V: SparkType, T <: HList] = + implicit def Found[K <: Symbol, _V: SparkType, T <: HList] + : SelectorWithSparkType[FieldType[K, _V] :: T, K] { type V = _V } = new SelectorWithSparkType[FieldType[K, _V] :: T, K] { type V = _V val st = SparkType[_V] @@ -141,7 +142,7 @@ protected trait DStructs { trait SelectorLPI { implicit def KeepFinding[K1, V1, T <: HList, K <: Symbol](implicit T: SelectorWithSparkType[T, K] - ) = + ): SelectorWithSparkType[FieldType[K1, V1] :: T, K] { type V = T.V } = new SelectorWithSparkType[FieldType[K1, V1] :: T, K] { type V = T.V val st = T.st