Querying historical node gives empty results

If I query a historical node directly, it gives empty results. This is only happening for datasources that have multiple segments for queryGranularity.
If I query historical node for a datasource that has single segment for queryGranularity, then it gives correct results.

The results from broker node is correct.

I have verified the broker logs and it is routing the request to correct historical nodes.

For eg.

QueryGranularity = 1 Hour

Datasource ds1 has 1 segment for 1 hour.

Datasource ds2 has 10 segments for 1 hour.

If I query historical nodes (for any duration), ds1 gives expected results but ds2 gives empty results.