You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2015/12/09 11:46:10 UTC

[jira] [Resolved] (METAMODEL-195) Scalar function to get key from a MAP type field

     [ https://issues.apache.org/jira/browse/METAMODEL-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kasper Sørensen resolved METAMODEL-195.
---------------------------------------
       Resolution: Fixed
         Assignee: Kasper Sørensen
    Fix Version/s: 4.4.2

> Scalar function to get key from a MAP type field
> ------------------------------------------------
>
>                 Key: METAMODEL-195
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-195
>             Project: Apache MetaModel
>          Issue Type: Improvement
>            Reporter: Kasper Sørensen
>            Assignee: Kasper Sørensen
>             Fix For: 4.4.2
>
>
> Now that we have support for scalar functions, and we also support a host of key/value or document oriented datastores, I think it would be really natural to support a function for getting a value inside a map.
> Example:
> {code}
> SELECT MAP_VALUE(address, 'street') FROM contacts
> {code}
> Ideally the function would allow for a full "path" of keys so that you could have maps-within-maps and so on.
> {code}
> SELECT MAP_VALUE(address, 'homeaddress.street') FROM contacts
> {code}
> Even more ideally we would also add a bit of query parser logic to allow expressing the path as part of the operand itself:
> {code}
> SELECT address.homeaddress.street FROM contacts
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)