Just to clarify that Calcite does not explicitly attempt to provide any JSONPath support. The examples that you show just happen to work based on standard SQL syntax. -- Michael Mior mm...@apache.org
Le lun. 3 mai 2021 à 14:25, Amrish Lal <amrish.k....@gmail.com> a écrit : > > Hello, > > Calcite is used as the parsing layer of a database I am working on. I > noticed that calcite support dot notation and array subscripts in > identifiers as in: > > SELECT json_column.person.name.email[5] FROM table > > This allows for writing rudimentary Json Path expressions. However, some > support is still missing. For example, the following queries will give > parsing errors. > > SELECT json_column.person.name.email[*] FROM table > SELECT json_column.person.name.email[:2] FROM table > SELECT json_column.person.name.email[1,3] FROM table > SELECT json_column..email FROM table > SELECT json_column.person..name FROM table > etc... (more json path examples here > <https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html> > ) > > From what I can see, this shouldn't be very complicated to add and will > mainly require accepting a wider range of characters in SELECT list > expression values. > > We only need basic json path expression support for now (dot operator and > array subscript operator) which calcite seems to already support, but would > like to add further json path expression support in future. I am wondering > if Calcite is open to further supporting json path expressions in SELECT > and WHERE clause expression list?