You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/11/07 18:39:31 UTC
[GitHub] [druid] gianm commented on a diff in pull request #13310: Improve fetch of pending segments from metadata store
gianm commented on code in PR #13310:
URL: https://github.com/apache/druid/pull/13310#discussion_r1015773231
##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -232,7 +232,10 @@ private Set<SegmentIdWithShardSpec> getPendingSegmentsForIntervalWithHandle(
final ResultIterator<byte[]> dbSegments =
handle.createQuery(
StringUtils.format(
- "SELECT payload FROM %1$s WHERE dataSource = :dataSource AND start <= :end and %2$send%2$s >= :start",
+ // This query might fail if the year has a different number of digits
+ // See https://github.com/apache/druid/pull/11582 for a similar issue
+ // Using long for these timestamps instead of varchar would give correct time comparisons
+ "SELECT payload FROM %1$s WHERE dataSource = :dataSource AND start < :end and %2$send%2$s > :start",
Review Comment:
This looks like the only material change in the patch: what's the idea behind changing `<=` to `<` and what's the expected benefit?
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org