Skip to content

Commit 3aa79d4

Browse files
committed
Resolve conflicts
1 parent b8c6c94 commit 3aa79d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ExprUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ object ExprUtils {
4747
def evalTypeExpr(exp: Expression): DataType = exp match {
4848
case Literal(s, StringType) => DataType.fromDDL(s.toString)
4949
case e @ SchemaOfJson(_: Literal, _) =>
50-
val ddlSchema = e.eval().asInstanceOf[UTF8String]
50+
val ddlSchema = e.eval(EmptyRow).asInstanceOf[UTF8String]
5151
DataType.fromDDL(ddlSchema.toString)
5252
case e => throw new AnalysisException(
5353
"Schema should be specified in DDL format as a string literal or output of " +

sql/core/src/test/resources/sql-tests/results/json-functions.sql.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ select from_json()
157157
struct<>
158158
-- !query 17 output
159159
org.apache.spark.sql.AnalysisException
160-
Schema should be specified in DDL format as a string literal or output of the schema_of_json function instead of 1;; line 1 pos 7
160+
Invalid number of arguments for function from_json. Expected: one of 2 and 3; Found: 0; line 1 pos 7
161161

162162

163163
-- !query 18

0 commit comments

Comments
 (0)