AmatyaAvadhanula commented on code in PR #13310:
URL: https://github.com/apache/druid/pull/13310#discussion_r1015061939
##########
server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:
##########
@@ -232,8 +232,14 @@ 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",
- dbTables.getPendingSegmentsTable(), connector.getQuoteString()
+ // 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 start, %2$send%2$s, payload FROM %1$s "
Review Comment:
Nit: Do start and end still need to be selected in the query?
--
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]