File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions
core/src/test/resources/sql-tests/results Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ object ExprUtils {
47
47
def evalTypeExpr (exp : Expression ): DataType = exp match {
48
48
case Literal (s, StringType ) => DataType .fromDDL(s.toString)
49
49
case e @ SchemaOfJson (_ : Literal , _) =>
50
- val ddlSchema = e.eval().asInstanceOf [UTF8String ]
50
+ val ddlSchema = e.eval(EmptyRow ).asInstanceOf [UTF8String ]
51
51
DataType .fromDDL(ddlSchema.toString)
52
52
case e => throw new AnalysisException (
53
53
" Schema should be specified in DDL format as a string literal or output of " +
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ select from_json()
157
157
struct<>
158
158
-- !query 17 output
159
159
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
161
161
162
162
163
163
-- !query 18
You can’t perform that action at this time.
0 commit comments