Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/20887#discussion_r177593580 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala --- @@ -1152,7 +1152,18 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging * Create a [[Cast]] expression. */ override def visitCast(ctx: CastContext): Expression = withOrigin(ctx) { - Cast(expression(ctx.expression), visitSparkDataType(ctx.dataType)) + typedVisit[DataType](ctx.dataType) match { + case t: CharType => --- End diff -- I do not think this is the right thing we should do unless we can natively support CHAR and VARCHAR.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org