loquisgon commented on a change in pull request #10856:
URL: https://github.com/apache/druid/pull/10856#discussion_r572489835
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java
##########
@@ -622,30 +625,50 @@ private static DataSchema createDataSchema(
Granularity segmentGranularity
)
{
- // check index metadata
+ // check index metadata &
+ // set carry-over aspects only if they are all set and the same for all
segments
+ final SettableSupplier<Boolean> rollup = new SettableSupplier<>();
+ final SettableSupplier<Boolean> rollupIsValid = new
SettableSupplier<>(true);
+ final SettableSupplier<Granularity> queryGranularity = new
SettableSupplier<>();
+ Set<Granularity> finerGranularities = new HashSet<>();
for (NonnullPair<QueryableIndex, DataSegment> pair :
queryableIndexAndSegments) {
final QueryableIndex index = pair.lhs;
if (index.getMetadata() == null) {
throw new RE("Index metadata doesn't exist for segment[%s]",
pair.rhs.getId());
}
+ // carry-overs (i.e. query granularity & rollup) are valid iff they are
the same in every segment:
Review comment:
Done
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]