You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Boaz Ben-Zvi (JIRA)" <ji...@apache.org> on 2016/11/03 01:13:58 UTC

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

Boaz Ben-Zvi created DRILL-4993:
-----------------------------------

             Summary: 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
             Fix For: 1.9.0


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.3.4#6332)