Not enough arguments for method in spark2


#1

Hi Team

Can you please help me out with below issue?

val spark = SparkSession.builder.
  master("local").
  appName("Girish DF").
  getOrCreate()
val orderDF = spark.read.csv("C:/data/retail_db/orders/part-00000")
val orderItemsDF = spark.read.csv("C:/data/retail_db/order_items/part-00000")
case class Order (
                   order_id: BigInt,
                   order_date: String,
                   order_customer_id: BigInt,
                   order_status: String
                 )
val orderDS: Dataset[Order] = orderDF.as[Order]

Error msg:

Error:(22, 45) not enough arguments for method as: (implicit evidence$2: org.apache.spark.sql.Encoder[Order])org.apache.spark.sql.Dataset[Order].
Unspecified value parameter evidence$2.
val orderDS: Dataset[Order] = orderDF.as[Order]