Skip to content
Advertisement

UnsupportedOperationException while creating a dataset manually using Java SparkSession

I am trying to create a Dataset from Strings like below in my JUnit test.

JavaScript

But I am seeing this below error:

JavaScript

What am I missing here?

My main method works fine, but this test is failing. Looks like something is not read from the classpath correctly.

Advertisement

Answer

I fixed it by excluding this below dependency from all dependencies related to Spark:

JavaScript
Advertisement