loquisgon commented on code in PR #12392:
URL: https://github.com/apache/druid/pull/12392#discussion_r850746599
##########
indexing-service/src/main/java/org/apache/druid/indexing/input/DruidSegmentInputFormat.java:
##########
@@ -55,14 +56,30 @@ public InputEntityReader createReader(
File temporaryDirectory
)
{
- return new DruidSegmentReader(
- source,
- indexIO,
- inputRowSchema.getTimestampSpec(),
- inputRowSchema.getDimensionsSpec(),
- inputRowSchema.getColumnsFilter(),
- dimFilter,
- temporaryDirectory
+ // this method handles the case when the entity comes from a tombstone or
from a regular segment
+ Preconditions.checkArgument(
+ source instanceof DruidSegmentInputEntity,
+ DruidSegmentInputEntity.class.getName() + " required, but "
+ + source.getClass().getName() + " provided."
);
+
+ InputEntityReader retVal = null;
+ // source is tombstone case
+ if ((source instanceof DruidSegmentInputEntity) &&
((DruidSegmentInputEntity) source).isFromTombstone()) {
Review Comment:
yeah.. the second check is redundant, by the time the code gets there the
cast should always work due to the precondition passing...
--
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]