drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boaz Ben-Zvi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4993) Documentation: Wrong output displayed for convert_from() with a map
Date Thu, 03 Nov 2016 01:13:58 GMT
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)

Mime
View raw message