Ingo Bürk created CALCITE-4717:
----------------------------------
Summary: Lax mode for JSON paths doesn't automatically unnest
arrays
Key: CALCITE-4717
URL: https://issues.apache.org/jira/browse/CALCITE-4717
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.27.0
Reporter: Ingo Bürk
Given the following test in CalciteSqlOperatorTest:
{code:java}
@Test
public void test() {
tester.checkBoolean("json_exists('{\"a\": [{\"b\": 1}, {\"b\": 2}]}', 'lax
$.a.b')", Boolean.TRUE);
}
{code}
Yields:
{code:java}
expected: <[true]> but was: <[false]>{code}
However, according to the specification (ISO/IEC TR 19075-6 (a) 6.3, Table 28,
First Row and (b) 5.3.1) this should pass, and be equivalent to `strict
$.a[*].b` (which does indeed pass). This is because in lax mode arrays should
be automatically unnested.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)