VGalaxies commented on code in PR #11757:
URL: https://github.com/apache/iotdb/pull/11757#discussion_r1436075243
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java:
##########
@@ -130,22 +144,52 @@ public ProgressIndex getProgressIndex() {
@Override
public PipeInsertNodeTabletInsertionEvent
shallowCopySelfAndBindPipeTaskMetaForProgressReport(
- String pipeName, PipeTaskMeta pipeTaskMeta, String pattern) {
+ String pipeName, PipeTaskMeta pipeTaskMeta, String pattern, long
startTime, long endTime) {
return new PipeInsertNodeTabletInsertionEvent(
walEntryHandler,
progressIndex,
isAligned,
isGeneratedByPipe,
pipeName,
pipeTaskMeta,
- pattern);
+ pattern,
+ startTime,
+ endTime);
}
@Override
public boolean isGeneratedByPipe() {
return isGeneratedByPipe;
}
+ @Override
+ public boolean isEventTimeOverlappedWithTimeRange() {
+ try {
+ InsertNode insertNode = getInsertNode();
+ if (insertNode instanceof InsertRowNode) {
+ long timestamp = ((InsertRowNode) insertNode).getTime();
+ return startTime <= timestamp && timestamp <= endTime;
+ } else if (insertNode instanceof InsertTabletNode) {
Review Comment:
length of zero indicates no data, safe for
`isEventTimeOverlappedWithTimeRange` to return false 🤔
--
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]