shwin opened a new issue, #10986:
URL: https://github.com/apache/pinot/issues/10986
we're seeing something strange with timestamp indices and segment pruning.
```
We have a timestamp index like this:
{
"name": "blockTimestamp",
"encodingType": "DICTIONARY",
"indexType": "TIMESTAMP",
"indexTypes": [
"TIMESTAMP"
],
"timestampConfig": {
"granularities": [
"SECOND",
"MINUTE",
"HOUR",
"DAY",
"WEEK",
"MONTH",
"YEAR"
]
},
"indexes": null
},
```
What we're trying to do is count the number of rows in a single day, in our
case 2021-05-11.
So we do a query like this, with a date range:
`select $segmentName, DATETRUNC('day', "blockTimestamp")
"blockTimestamp_day", count("transactionFrom") "Count Transaction From Address"
from "13059af7-8eab-4196-a7ea-1a170d73c02e" where blockTimestamp_day >=
fromDateTime('2021-05-11', 'yyyy-MM-dd') and blockTimestamp_day <
fromDateTime('2021-05-12', 'yyyy-MM-dd') group by "blockTimestamp_day",
$segmentName order by "blockTimestamp_day"`
We get these results, which look correct:
```
13059af7-8eab-4196-a7ea-1a170d73c02e_OFFLINE_1620454828000_1620702391000_61_2296cf5b-2896-4ff8-bb57-0405bd69a7dc
2021-05-11 00:00:00.0 34699
13059af7-8eab-4196-a7ea-1a170d73c02e_OFFLINE_1620702401000_1620964585000_62_9f7f4c0f-5d06-4909-99c0-7c009ff53385
2021-05-11 00:00:00.0 247050
```
But if instead, we change this to do a `=` query, which should be exactly
the same results, we only pick up 1 segment:
13059af7-8eab-4196-a7ea-1a170d73c02e_OFFLINE_1620702401000_1620964585000_62_9f7f4c0f-5d06-4909-99c0-7c009ff53385
2021-05-11 00:00:00.0 247050
Clearly, the first query is correct and the 2nd is incorrect, since we're
not picking up segments/values that we should be.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]