> On March 24, 2015, 11:30 p.m., Jason Dere wrote: > > ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java, line 136 > > <https://reviews.apache.org/r/32374/diff/1/?file=902256#file902256line136> > > > > I don't know anything about JsonPath - so "$[0]", "[0]", "$.[0]" are > > all valid JsonPath? Should the path string always start with $ to be > > consistent with the rest of the syntax?
Hi Jason, thank you for looking at the patch. $[0] and $.[0] are both valid. You can try to evaluate jsonpathes here online http://ashphy.com/JSONPathOnlineEvaluator/ I'll change the code to require jsonpath to start with $[ or $. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32374/#review77672 ----------------------------------------------------------- On March 22, 2015, 6:07 a.m., Alexander Pivovarov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32374/ > ----------------------------------------------------------- > > (Updated March 22, 2015, 6:07 a.m.) > > > Review request for hive, Jason Dere and namit jain. > > > Bugs: HIVE-1575 > https://issues.apache.org/jira/browse/HIVE-1575 > > > Repository: hive-git > > > Description > ------- > > HIVE-1575 get_json_object does not support JSON array at the root level > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java > 781286613d1b939f684e7be95341adaeeca0c60e > ql/src/test/org/apache/hadoop/hive/ql/udf/TestUDFJson.java PRE-CREATION > ql/src/test/queries/clientpositive/udf_get_json_object.q > 05f7f5a9811bc028565d88f08fc36058cd85148d > ql/src/test/results/clientpositive/udf_get_json_object.q.out > 51f0c1510d101189e281f40ffd7bcd7f1ed97c84 > > Diff: https://reviews.apache.org/r/32374/diff/ > > > Testing > ------- > > > Thanks, > > Alexander Pivovarov > >