Cannot Merge Columns of FLOAT and LONG

Hi guys,

I’m looking to store a hyperUnique metric for a column while also storing the column itself but I’m running into a snag. I’m getting a failure on the persist:

2015-07-17T02:00:00,134 ERROR [events-2015-07-17T00:00:00.000Z-persist-n-merge] io.druid.segment.realtime.plumber.RealtimePlumber - Failed to persist merged index[events]: {class=io.druid.segment.realtime.plumber.RealtimePlumber, exceptionType=class com.metamx.common.ISE, exceptionMessage=Cannot merge columns of type[FLOAT] and [LONG], interval=2015-07-17T00:00:00.000Z/2015-07-17T01:00:00.000Z}

com.metamx.common.ISE: Cannot merge columns of type[FLOAT] and [LONG]

    at io.druid.segment.column.ColumnCapabilitiesImpl.merge(ColumnCapabilitiesImpl.java:124) ~[druid-processing-0.8.0.jar:0.8.0]

    at io.druid.segment.IndexMerger.makeIndexFiles(IndexMerger.java:481) ~[druid-processing-0.8.0.jar:0.8.0]

    at io.druid.segment.IndexMerger.merge(IndexMerger.java:336) ~[druid-processing-0.8.0.jar:0.8.0]

    at io.druid.segment.IndexMerger.mergeQueryableIndex(IndexMerger.java:218) ~[druid-processing-0.8.0.jar:0.8.0]

    at io.druid.segment.IndexMerger.mergeQueryableIndex(IndexMerger.java:207) ~[druid-processing-0.8.0.jar:0.8.0]

    at io.druid.segment.realtime.plumber.RealtimePlumber$4.doRun(RealtimePlumber.java:446) [druid-server-0.8.0.jar:0.8.0]

    at io.druid.common.guava.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:40) [druid-common-0.8.0.jar:0.8.0]

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_79]

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_79]

    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]

From the looks of it other people were having the same issue, which makes sense for a simple metric. But for a hyperUnique metric I would think you would be able to keep both values.

Thanks,

Michael Capeloto

Can you please post your indexer json spec file?

– Himanshu

Hi, did you by any chance stop the realtime node, change the schema, but add a hyperUnique column with the same name as a previous existing column?

“dimensionsSpec” : {

“dimensions”: [

“device_id”

],

“dimensionExclusions” : ,

“spatialDimensions” :

}

}

},

“metricsSpec” : [

{

“type”: “hyperUnique”,

“name”: “unique_devices”,

“fieldName”: “device_id”

}

]

I’m using a realtime node right now, and the above spec was not successful. To get it to work I took out the device_id dimension.

It’s looking like I wasn’t careful enough with changing realtime specs and had a segment with my old specs and new specs combined. I was a little more careful and it worked fine