I have case classes that extend a trait Token and a function that returns a list of instances created using the case class apply method with appropria ...
I have case classes that extend a trait Token and a function that returns a list of instances created using the case class apply method with appropria ...
I've defined a case class to be used as a schema for a Dataset in Spark. I want to be able to refer to individual columns from that schema by referen ...
Consider: This outputs: But what I really want, is it to output: Effectively, I just want to delete the "Failed" block but keep everything wi ...
I have just shifted to the scala and there I have the Map object as per the below structure. Like this, I have 1000s of query details in this map o ...
I'm new to Scala and the only way I saw people access case classes was with pattern matching. I recently solved a Huffman coding problem with the fol ...
I have a case match statement that provides the following output. I'm trying to convert this into a sequence instead. Can you please help me with this ...
I'm trying to make use of circe for json parsing in scala. Can you please help me parse 'pocs' from the data in the case class as well? here is the co ...
I have a Kafka consumed record that will be parsed as JsValue with spray.json in scala, but I also have some data in the record's header, and I want t ...
Using scala 2.11.12. Scattered all over my code base I have a case class like this: (with a custom case class Sight) and a corresponding companion ...
I have a use case where I need to read a json file or json string using spark as Dataset[T] in scala. The json file has nested elements and some of th ...
This is fine: case class trans(atm : String, num: Int) val array = Array((20254552,"ATM",-5100), (20174649,"ATM",5120)) val rdd = sc.parallelize ...
Using protocol-buffers and scalapb, I have a number of source managed final case classes that are now immutable. I need to be able to add additional ...
I've been trying ot create a function that does some inflection on any case class but can't figure out how to pull it off on non concrete generic type ...
When I tried to convert Some(string) into a case class I am getting an exception. Ex: ...
Considering a case class that has a default field calculated at creating time, is it possible to copy it where the new copied case class has this fiel ...
Suppose you have a case class like below and you also have list of case class ...
I have the following: scala> trait Tail scala> case class Cat(name: String) scala> val aa = new Cat(name = "bob") val aa: Cat with Tail = Ca ...
How can I convert mylist into List[student2] in more elegant way than this? ...
with case class we have some restrictions... with StructType is it possible to for 100+ columns, Is there any other way to create scheme for around 60 ...
Given a spark DataFrame with columns "id", "first", "last", "year" and case class I would like to only select columns in case class which are id ...