drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "benj (Jira)" <j...@apache.org>
Subject [jira] [Created] (DRILL-7375) composite type map cast/convert_to
Date Fri, 13 Sep 2019 15:31:00 GMT
benj created DRILL-7375:
---------------------------

             Summary: composite type map cast/convert_to
                 Key: DRILL-7375
                 URL: https://issues.apache.org/jira/browse/DRILL-7375
             Project: Apache Drill
          Issue Type: Wish
          Components: Functions - Drill
    Affects Versions: 1.16.0
            Reporter: benj


As it possible to cast varchar to map (JSON) with convert_from
{code:sql}
SELECT a, typeof(a) from (SELECT CONVERT_FROM('{a : 100, b: 200}' ,'JSON') a);
+-------------------+--------+
|         a         | EXPR$1 |
+-------------------+--------+
| {"a":100,"b":200} | MAP    |
+-------------------+--------+
{code}

It will be very usefull to have the capacity to "cast" the _MAP_ into VARCHAR with a "cast
syntax" or with a "convert_to" possibility

Please note that these possibility of course exists in other database systems (example postgres
: _SELECT '{"a":100,"b":200}'::json::text_)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message