[
https://issues.apache.org/jira/browse/CALCITE-4717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17395846#comment-17395846
]
Ingo Bürk commented on CALCITE-4717:
------------------------------------
I've opened a feature request against JsonPath now:
https://github.com/json-path/JsonPath/issues/746
> 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
> Priority: Major
>
> 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)