Open spershin opened 1 month ago
@spershin to word this bug differently, you believe Presto should make a better best effort attempt at parsing the first example, even though it is not valid JSON?
@spershin to word this bug differently, you believe Presto should make a better best effort attempt at parsing the first example, even though it is not valid JSON?
@tdcmeehan That's one way to go. Of course, leaving it "as is" is valid too.
Consider the 3 queries below, which all should have the same result:
In the 1st case Java returns NULL, which seem incorrect. See the difference in the input string of the Q1 and Q3 - in the Q1 we have
"failure_reason": None
, where None is not in quotes.json_extract()
behaves the same.For the query
Meaning both C++ and Java treat the particular element is invalid.
It looks like Java abandons search when hitting
None
, because it is 'invalid' json?Similarly, json_size() behaves:
It might be that the implicit conversion from varchar to json type causes functions to return NULL.