Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/21472#discussion_r192583925
--- Diff: sql/core/src/test/resources/sql-tests/inputs/json-functions.sql
---
@@ -25,6 +25,10 @@ select from_json('{"a":1}', 'a InvalidType');
select from_json('{"a":1}', 'a INT', named_struct('mode', 'PERMISSIVE'));
select from_json('{"a":1}', 'a INT', map('mode', 1));
select from_json();
+-- from_json - schema in json format
+select from_json('{"a":1}',
'{"type":"struct","fields":[{"name":"a","type":"integer", "nullable":true}]}');
+select from_json('{"a":1}', '{"type":"map", "keyType":"string",
"valueType":"integer","valueContainsNull":false}');
+
--- End diff --
To make the output file changes smaller, can you add new tests in the end
of file?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]