1

I've created a org.apache.spark.sql.Row where one of the fields is a List[String]. When the Row contained only values like Strings and Booleans it was parsed without any errors. However now when it contains a List[String] I'm getting the following error:

scala.MatchError: List(, , , , ,) (of class scala.collection.immutable.$colon$colon)

I've made an attempt to convert it to a mutable collection type using .to[ListBuffer] but it did not help to solve the problem.

What is the correct way to add List[String] as a field to the org.apache.spark.sql.Row?

2
  • Possible duplicate of Access Array column in Spark Commented Feb 26, 2019 at 22:04
  • Can you share your code? Commented Feb 27, 2019 at 3:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.