Top "Scala" questions

Scala is a general-purpose programming language principally targeting the Java Virtual Machine.

How to query JSON data column using Spark DataFrames?

I have a Cassandra table that for simplicity looks something like: key: text jsonData: text blobData: blob I can create …

scala apache-spark dataframe apache-spark-sql spark-cassandra-connector
How to clone a case class instance and change just one field in Scala?

Let's say I have a case class that represents personas, people on different social networks. Instances of that class are …

scala
Accessing value returned by scala futures

I am a newbie to scala futures and I have a doubt regarding the return value of scala futures. So, …

scala future
Understanding what 'type' keyword does in Scala

I am new to Scala and I could not really find a lot about the type keyword. I am trying …

scala types
What are the various join types in Spark?

I looked at the docs and it says the following join types are supported: Type of join to perform. Default …

scala apache-spark apache-spark-sql spark-dataframe apache-spark-2.0
difference between foldLeft and reduceLeft in Scala

I have learned the basic difference between foldLeft and reduceLeft foldLeft: initial value has to be passed reduceLeft: takes first …

scala functional-programming fold higher-order-functions
Flattening Rows in Spark

I am doing some testing for spark using scala. We usually read json files which needs to be manipulated like …

scala apache-spark apache-spark-sql distributed-computing
Overload constructor for Scala's Case Classes?

In Scala 2.8 is there a way to overload constructors of a case class? If yes, please put a snippet to …

scala constructor overloading scala-2.8 case-class
How to convert a java.util.List to a Scala list

I have this Scala method with below error. Cannot convert into a Scala list. def findAllQuestion():List[Question]={ questionDao.getAllQuestions() } …

list scala scala-java-interop
How to wait for several Futures?

Suppose I have several futures and need to wait until either any of them fails or all of them succeed. …

scala concurrency future