LakshSingla commented on issue #14800:
URL: https://github.com/apache/druid/issues/14800#issuecomment-1675374246
FWIW, I think a crude way of breaking the tie-breakers currently in Druid
would be to use GroupBy and nested query for deduplication b/w the primary
timestamp. This might look something like the following for your use case:
```sql
WITH
mainTable AS (
SELECT TIME_FLOOR(__time, 'PT1H') as flooredTime,
"dim",
__time,
time2,
value
)
SELECT floored_time, "dim", EARLIEST_BY("innerColumn", __time)
FROM (
SELECT floored_time, "dim", EARLIEST_BY("value", TIME_PARSE("time2")) AS
innerColumn, __time
FROM mainTable
GROUP BY floored_time, "dim", __time
)
GROUP BY floored_time, "dim"
```
--
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]