[ https://issues.apache.org/jira/browse/SPARK-31686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105939#comment-17105939 ]
daile commented on SPARK-31686: ------------------------------- [~bruneltouopi] looks like it was specifically removed {code:java} val buf = buffer.getBuffer if (dirty > 1) { g.writeRawValue(buf.toString) } else if (dirty == 1) { // remove outer array tokens g.writeRawValue(buf.substring(1, buf.length()-1)) } // else do not write anything {code} > Return of String instead of array in function get_json_object > ------------------------------------------------------------- > > Key: SPARK-31686 > URL: https://issues.apache.org/jira/browse/SPARK-31686 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.4.5 > Environment: {code:json} > // code placeholder > { > customer:{ > addesses:[ { {code} > location : arizona > } > ] > } > } > get_json_object(string(customer),'$addresses[*].location') > return "arizona" > result expected should be > ["arizona"] > Reporter: Touopi Touopi > Priority: Major > > when we selecting a node of a json object that is array, > When the array contains One element , the get_json_object return a String > with " characters instead of an array of One element. > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org