You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Parth Chandra (JIRA)" <ji...@apache.org> on 2015/04/20 20:06:59 UTC

[jira] [Updated] (DRILL-366) Casting to BigInt from Varchar produces wrong results

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

Parth Chandra updated DRILL-366:
--------------------------------
    Component/s: Functions - Drill

> Casting to BigInt from Varchar produces wrong results
> -----------------------------------------------------
>
>                 Key: DRILL-366
>                 URL: https://issues.apache.org/jira/browse/DRILL-366
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Mehant Baid
>            Assignee: Mehant Baid
>            Priority: Blocker
>             Fix For: 0.4.0
>
>         Attachments: DRILL-366.patch
>
>
> Can be reproduced using the following plan:
> {
>     head:{
>         type:"APACHE_DRILL_PHYSICAL",
>         version:"1",
>         generator:{
>             type:"manual"
>         }
>     },
>         graph:[
>         {
>             @id:1,
>             pop:"json-scan",
>             entries: [
>                 {
>                     path : "/tmp/scan4.json"
>                 }
>             ],
>             storageengine: {
>                 "type": "json",
>                 "dfsName": "file:///"
>             }
>         },
>         {
>             pop:"project",
>             @id:2,
>             child: 1,
>             exprs: [ {
>               ref: "int",
>               expr: "cast(integer as bigint)"     
>             } ]
>         },
>         {
>             @id: 3,
>             child: 2,
>             pop: "screen"
>         }   
>     ]         
> } 
> Input file, "/tmp/scan4.json":
> {
>   "integer" : "2008"
> }
> {
>   "integer" : "2007"
> }
> {
>   "integer" : "2006"
> }
> Output:
> 2008
> 2008
> 2008
> From the above output we notice that it always generates values corresponding to the first row. Looks like the buffer is not getting reset to the next row.



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