The only way I can think of the top of my head is to use a CASE
statement and construct the map differently based on the value of c.
--
Michael Mior
mm...@apache.org

Le mer. 20 mars 2019 à 14:45, Shahar Cizer Kobrinsky
<shahar.kobrin...@gmail.com> a écrit :
>
> Hey All,
>
> New to Calcite, trying to express a select statement in SQL where i build a
> map.
> The thing is i want to conditionally add items to it, so for example have
> key 'c' with value from column 'c' only if the value is not null
>
> SELECT a,b, map['c',c, 'd', d] as my_map  FROM...
>
> Is there a way to conditionally have key/values in the map?
>
> Thanks!
> Shahar

Reply via email to