Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22442#discussion_r218642844 --- Diff: sql/core/src/test/resources/sql-tests/inputs/json-functions.sql --- @@ -56,3 +56,8 @@ select from_json('[{"a": 1}, 2]', 'array<map<string,int>>'); select to_json(array('1', '2', '3')); select to_json(array(array(1, 2, 3), array(4))); +-- infer schema of json literal using options +select schema_of_json('{"c1":1}', map('primitivesAsString', 'true')); +select schema_of_json('{"c1":01, "c2":0.1}', map('allowNumericLeadingZeros', 'true', 'prefersDecimal', 'true')); + + --- End diff -- nit: unneeded newline
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org