justinborromeo opened a new pull request #7546: Fix time-ordered scan queries on realtime segments URL: https://github.com/apache/incubator-druid/pull/7546 This patch fixes the following 2 bugs introduced in #7133: 1) ClassCastException is thrown when a timestamp less than `Integer.MAX_VALUE` is being scan queried with a ASCENDING or DESCENDING time-ordering. The original timestamp comparator was written to assume that all timestamps are longs. However, if a timestamp less than the maximum integer value is used, the broker will parse the value as an Integer. Since Integers can't be cast to Longs, an exception was thrown. This patch introduces a type check for timestamps that properly parses it if it's either an Integer or a Long. 2) UnsupportedOperationException is thrown when time-ordered scan querying a realtime segment. In the case of published segments, there's a 1:1 mapping between query runners and segment descriptors. The existing implementation relied on this mapping to calculate which query runners corresponded to each interval. However, this mapping doesn't exist when querying a realtime segment since a query runner is generated for each hydrant but only one segment descriptor is generated. This patch introduces a `SinkQueryRunners` class that implements `Iterable<QueryRunner>` and holds mappings between intervals and query runners.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
