You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2014/02/12 01:18:22 UTC
[jira] [Created] (DRILL-366) Casting to BigInt from Varchar
produces wrong results
Mehant Baid created DRILL-366:
---------------------------------
Summary: 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
Reporter: Mehant Baid
Priority: Blocker
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.1.5#6160)