Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
With CALCITE-194 it will be possible to SELECT elements of arrays.
Would be great to support WHERE clauses for arrays especially for arrays of embedded documents.
I tried it with the fix from CALCITE-194
{ "name": "ZIPS", "type": "view", "sql": "select cast(_MAP['city'] AS varchar(20)) AS city,\n cast(_MAP['loc'][0] AS float) AS longitude, cast(_MAP['loc'][1] AS float) AS latitude, cast(_MAP['pop'] AS integer) AS pop, cast(_MAP['state'] AS varchar(2)) AS state, cast(_MAP['_id'] AS varchar(5)) AS id from \"mongo_raw\".\"zips\"" } Select longitude from zips where longitude = -71.425486
Mongo Adapter Exception
java.lang.AssertionError: cannot translate op null call =(CAST(CAST(ITEM(ITEM($0, 'loc'), 0)):FLOAT):DOUBLE, -71.425486)
Attachments
Issue Links
- relates to
-
CALCITE-194 Array items in MongoDB adapter
- In Progress