You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Pritesh Maker (JIRA)" <ji...@apache.org> on 2017/08/25 17:33:00 UTC

[jira] [Updated] (DRILL-4993) Documentation: Wrong output displayed for convert_from() with a map

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

Pritesh Maker updated DRILL-4993:
---------------------------------
    Fix Version/s:     (was: 1.9.0)

> Documentation: Wrong output displayed for convert_from() with a map
> -------------------------------------------------------------------
>
>                 Key: DRILL-4993
>                 URL: https://issues.apache.org/jira/browse/DRILL-4993
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.8.0
>            Reporter: Boaz Ben-Zvi
>            Priority: Trivial
>
> In the Drill docs: 
>  SQL REFERENCE -> SQL FUNCTIONS -> DATA TYPE CONVERSION
> The output for the example shown for convert_from() with a map into JSON is wrong:
> -------------------------  BEGIN EXCERPT ---------------------------------------------------------------------
> This example uses a map as input to return a repeated list vector (JSON).
> SELECT CONVERT_FROM('[{a : 100, b: 200}, {a:300, b: 400}]' ,'JSON') AS MYCOL1  FROM (VALUES(1));
> +--------------------+
> |       MYCOL1       |
> +--------------------+
> | [[1,2],[3,4],[5]]  |
> +--------------------+
> 1 row selected (0.141 seconds)
> -------------------------  END ----------------------------------------------
> The correct output should be:
> ---------------------------------------
> SELECT CONVERT_FROM('[{a : 100, b: 200}, {a:300, b: 400}]' ,'JSON') AS MYCOL1  FROM (VALUES(1));
> +----------------------------------------+
> |                 MYCOL1                 |
> +----------------------------------------+
> | [{"a":100,"b":200},{"a":300,"b":400}]  |
> +----------------------------------------+
> 1 row selected (2.618 seconds)
> The error probably resulted from copying the output of the previous example.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)