You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/04/14 05:25:12 UTC

[jira] [Commented] (DRILL-2373) JSON query request returns all types as strings

    [ https://issues.apache.org/jira/browse/DRILL-2373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14493502#comment-14493502 ] 

Jason Altekruse commented on DRILL-2373:
----------------------------------------

Hey Adam,

The patch overall looks like a good fix for the issue. I tried to reach out to [~sudheeshkatkam] who worked on the REST API to find out if we have any unit tests for it. Unfortunately we do not currently. Would you have some time available to try to write a few basic tests against it? I am a little nervous merging this if it might cause regressions in the Web UI, the reason for the current string centric design was actually because the data types were causing issues with the web UI templates when it was last being worked on actively. Your fix for the boolean data type might cover everything, but I would feel a little better if we started adding some automated tests, at least for the JSON API, and I can try to send out a message to list to see if we can't have a couple of people try to do some sanity testing on the web interface with this patch applied before we merge it in.

> JSON query request returns all types as strings
> -----------------------------------------------
>
>                 Key: DRILL-2373
>                 URL: https://issues.apache.org/jira/browse/DRILL-2373
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - HTTP
>    Affects Versions: 0.7.0, 0.8.0
>            Reporter: Adam Gilmore
>            Assignee: Jason Altekruse
>            Priority: Minor
>         Attachments: DRILL-2373.1.patch.txt, DRILL-2373.2.patch.txt
>
>
> I'm not sure if the query JSON endpoint is a valid, documented feature of Drill, but at the moment it returns all results as strings.
> So, for example:
> {code}select count(*) from cp.`employee.json`{code}
> Will return "1155" (as a string) as opposed to 1155 (as a numeric JSON value).
> It really should be returning numeric values as proper JSON numeric values.  Same should apply for boolean values.
> How we handle other data types (i.e. dates, intervals, timestamps, etc.) needs discussion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)