[
https://issues.apache.org/jira/browse/MRQL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonidas Fegaras updated MRQL-8:
--------------------------------
Attachment: MRQL-8.patch
> Overload projections to work on JSON data
> -----------------------------------------
>
> Key: MRQL-8
> URL: https://issues.apache.org/jira/browse/MRQL-8
> Project: MRQL
> Issue Type: Improvement
> Components: Query Translation
> Affects Versions: 0.9.0
> Reporter: Leonidas Fegaras
> Assignee: Leonidas Fegaras
> Priority: Minor
> Attachments: MRQL-8.patch
>
>
> To make queries on JSON data easier to write, need to overload projections to
> work on JSON objects.
> If x is the JSON object { "a": 1, "b": 2 }, then x.a must be 1.
> If x is the JSON array [ { "a": 1, "b": 2 }, { "c": 3, "a": 4 }, { "b": 5 }
> ], the x.a nut return [ 1, 4 ].
> Example:
> select s
> from JArray(i) in source(json,"tests/data/file.json",["items"]).items,
> Jstring(s) in i.id;
> over the JSON file:
> {"menu": {
> "header": "SVG Viewer",
> "items": [
> {"id": "Open"},
> {"id": "OpenNew", "label": "Open New"},
> ... ] } }
> must return:
> [ "Open", "OpenNew", ... ]
> (the JSON file was split over "items").
> I am attaching the patch.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira