Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22666#discussion_r226640362
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/csvExpressions.scala
 ---
    @@ -60,7 +63,7 @@ case class CsvToStructs(
       // Used in `FunctionRegistry`
       def this(child: Expression, schema: Expression, options: Map[String, 
String]) =
         this(
    -      schema = ExprUtils.evalSchemaExpr(schema),
    +      schema = ExprUtils.evalSchemaExpr(schema).asInstanceOf[StructType],
    --- End diff --
    
    why do we need `asInstanceOf`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to