Skip to main content

Questions tagged [scala-2.12]

Version 2.12 of the Scala programming language.

0 votes
0 answers
55 views

Scala 2.13 migration from 2.12 bring Conflicting cross-version suffixes in: org.scala-lang.modules:scala-parser-combinators

While I am trying to migrate scala project from 2.12 to 2.13 , I am getting the below error with following stracktrace java.lang.RuntimeException: Conflicting cross-version suffixes in: org.scala-...
Ayon's user avatar
  • 1
0 votes
0 answers
28 views

Spark2 to Spark3 Upgrade -> DataFrame foreachPartition method does not work

This code works in Spark 2.4 with Scala 2.11.7. It is not working in Spark 3.4.2 with Scala 2.12.15. I have tried Running change the foreachPartition(parti => { }) to .foreachPartition((parti: ...
Ga999's user avatar
  • 71
0 votes
0 answers
32 views

Is there a way to instantiate an object from a generic in Scala 2?

Sorry for silly question in advance. I use Scala 2.12.15 and the design of the project implies the use of traits to add some logic to classes. I have class Printer and going to extend it with ...
aleks's user avatar
  • 1
0 votes
1 answer
103 views

Error importing Spark version 2.12.10 in Scala project Intellij IDE

I am trying to run Scala Spark code in IntelliJ IDE. I have created the following build.sbt file in my project root directory: name := "SimpleProject" version := "0.1" ...
Abishek's user avatar
  • 817
1 vote
1 answer
88 views

Jooq for scala, how to create Converter for Option[Long]

I guess there is some issue with scala Long and java primitive long class JooqOptionalLongConverter extends Converter[Long, Option[Long]] { override def from(databaseObject: Long): Option[Long] = ...
Capacytron's user avatar
  • 3,709
2 votes
1 answer
76 views

How to bulk connect IO bundles in chisel? How does BiConnect work?

I struggle to understand the documentation around the <> operator in chisel but I have managed to something like this successfully, so I thought I had some understanding of it: fetchStage....
KFaidon K.'s user avatar
0 votes
0 answers
92 views

More efficient groupBy scala, avoid GC overhead limit exceeded

This question is unrelated to Spark, and I'm working on scala 2.12 so I don't have access to groupMap or groupMapReduce. I currently have code like the following val customerTrips = customerData....
Ken Myers's user avatar
  • 616
0 votes
1 answer
124 views

Parametric polymorphism issue with spark implicits, value toDF is not a member of Seq[T]

This is on scala 2.12.10 and spark 2.4.8. I am trying to define a trait as follows with a method that can convert an array of some case class to be converted to a dataframe. The type parameter is ...
Ken Myers's user avatar
  • 616
0 votes
1 answer
149 views

main method not executed with App in Scala

Hi I'm new to scala and trying to use scala 2.12.10 for a project. I'm trying to follow along with this tutorial which is written for the latest version of scala and I've gotten it to work fine (the ...
Ken Myers's user avatar
  • 616
0 votes
1 answer
67 views

Dependent type constraints (?) on trait in Scala

I have the following model: sealed trait MyRequest { type Response <: MyResponse } sealed trait MyResponse { type Request <: MyRequest } case class SayHelloRequest(name: String) extends ...
user2682459's user avatar
  • 1,029
0 votes
1 answer
121 views

Return singleton/object from method

How can I make this work? def getSingleton[T <: scala.Singleton]: T = { ??? } object X val x = getSingleton[X.type] Or similar, appreciate the signature may need to change slightly.
user2682459's user avatar
  • 1,029
0 votes
3 answers
104 views

Scala: Sorting a list while keeping the position of placeholders

The problem I'm facing is sorting a List of Double values in Scala also containing some kind of placeholder values (Double.NaN in the example below. However, these can be set as required for the ...
Niklas2501's user avatar
0 votes
0 answers
80 views

scala migration backward compatibility issue

I am facing serialisation issue when trying to read the binary object file which is stored using scala 2.11.11 with scala 2.12.17. We're migrating our MLpipeline from Spark 2.4(scala 2.11.11) &to ...
SivaSingh's user avatar
0 votes
2 answers
111 views

(Scala 2.12.8) pattern type is incompatible with expected type for parameterized type inside of parameterized class

(Scala 2.12.8) Full Example So lets say you have some "TypeEvidence" for some specific concrete types: sealed trait TypeEvidence[+T] object TypeEvidence{ case object DoubleType extends ...
memorableusername's user avatar
0 votes
1 answer
378 views

In Scala, define a generic tuple type with variable length and multiple types

How can I define a generic tuple type that can have variable length contain different types ? In the below example, I would need to define the return type of foo in trait A to match the ...
pierre-vr's user avatar

15 30 50 per page
1
2 3 4 5 6