Compare two date hourly granularity interval issue

Hello guys,

Hope all are well

I am comparing two date data in report with different granularity. Now if I am comparing hourly granularity. It will return wrong data. Below is query and response. It will not return toDate interval data. columns which are without “previous”.

Query:
Granularity: Day:
var queryRep = client.timeseries();
queryRep.dataSource(APP_REPORTING_DATA_SOURCE)
//.dimension(dimension)
//.threshold(maxRecords)
.granularity(‘day’)
.aggregation(‘count’, ‘rows’);

Granularity: Hour:

var queryRep = client.timeseries();
queryRep.dataSource(APP_REPORTING_DATA_SOURCE);
queryRep.granularity(‘hour’);
queryRep.aggregation(‘count’, ‘rows’);

Aggregations:

.aggregations(
{
‘type’:‘count’,
‘name’:‘raw’
},
{
‘type’:‘filtered’,
‘name’:’_previous_raw’,
‘filter’:{‘type’:‘interval’,‘dimension’:’__time’,
‘intervals’:[fromDateInt+’/’+fromDateIntEnd]
},
‘aggregator’:{‘name’:’_previous_raw’,‘type’:‘count’,‘fieldName’:‘raw’}
},
{
‘type’:‘filtered’,
‘name’:‘impressions’,
‘filter’:{‘type’:‘interval’,‘dimension’:’__time’,
‘intervals’:[toDateInt+’/’+toDateIntEnd]},
‘aggregator’:{‘name’:‘impressions’,‘type’:‘doubleSum’,‘fieldName’:‘impressions’}
})

Response Data:

“_previous_cr”: 0.006342062193126024,
“_previous_ecpm”: 0.7518364307669966,
“conversions”: 0.0,
“_previous_OneDplusOld”: 0.0,
“clear_rate”: 0.0,
“_previous_clear_rate”: 4.232717984303216,
“_previous_payout”: 43.260000000000005,
“payout”: 0.0,
“_previous_ROI”: 103.29686325771029,
“OneHplusOld”: 0.0,
“_previous_OneHplusOld”: 10.0,
“_previous_wins”: 138472.0,
“_previous_win_rate”: 20.708508805513016,
“spend”: 0.0,
“win_rate”: 0.0,

Please let me know my mistakes. Thanks in advance

What version of Druid are you using? Are you using rollup or sketches?

Hello Rachel,

I am using 0.13.0-incubating druid version.

artifact is sketches.

Let me know if you need further information.