Sql in() function bug

hi all,

I test the druid sql in function where dimension dim2 is string type, but the result is wrong. It replace 34 to 3。

SELECT dim2 from druid.foo where dim2 in(34) group by dim2  ======  SELECT dim2 from druid.foo where dim2 in(3) group by dim2

anybody who knows where it is a druid sql bug?

thanks,
Jenny

Hey Jenny,

Can you please run “EXPLAIN PLAN FOR SELECT dim2 from druid.foo where dim2 in(34) group by dim2” and paste what you get?

Hi, Gian

why the filter value equals 3 rather then 34?

“queryType” : “groupBy”,
“dataSource” : {

“type” : “table”,

“name” : “foo”

},

“intervals” : {

“type” : “intervals”,

“intervals” : [ “-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z” ]

},

“virtualColumns” : ,

“filter” : {

“type” : “selector”,

“dimension” : “dim2”,

“value” : “3”,

“extractionFn” : null

},

“granularity” : {

“type” : “all”

},

“dimensions” : [ {

“type” : “default”,

“dimension” : “dim2”,

“outputName” : “d0”,

“outputType” : “STRING”

} ],

“aggregations” : ,

“postAggregations” : ,

“having” : null,

“limitSpec” : {

“type” : “NoopLimitSpec”

},

“context” : {

“defaultTimeout” : 300000,

“maxScatterGatherBytes” : 9223372036854775807

},

“descending” : false

}

在 2017年8月28日星期一 UTC+8下午3:47:44,hellobab…@gmail.com写道:

Hey Jenny,

It looks like this is a bug in 0.10.1 but it will be fixed in 0.11.0 (it is already fixed in master). It might have been a Calcite issue – we did upgrade Calcite since 0.10.1 was released.

ok, Thanks!

在 2017年8月29日星期二 UTC+8上午9:46:01,Gian Merlino写道: