luoluoyuyu commented on code in PR #13714:
URL: https://github.com/apache/iotdb/pull/13714#discussion_r1795663728
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/extractor/dataregion/realtime/matcher/CachedSchemaPatternMatcher.java:
##########
@@ -117,54 +133,18 @@ public Set<PipeRealtimeDataRegionExtractor> match(final
PipeRealtimeEvent event)
}
for (final Map.Entry<IDeviceID, String[]> entry :
event.getSchemaInfo().entrySet()) {
- final IDeviceID device = entry.getKey();
- final String[] measurements = entry.getValue();
-
- // 1. try to get matched extractors from cache, if not success, match
them by device
- final Set<PipeRealtimeDataRegionExtractor> extractorsFilteredByDevice =
- deviceToExtractorsCache.get(device,
this::filterExtractorsByDevice);
- // this would not happen
- if (extractorsFilteredByDevice == null) {
- LOGGER.warn("Match result NPE when handle device {}", device);
- continue;
- }
+ final IDeviceID deviceID = entry.getKey();
- // 2. filter matched candidate extractors by measurements
- if (measurements.length == 0) {
- // `measurements` is empty (only in case of tsfile event). match all
extractors.
- //
- // case 1: the pattern can match all measurements of the device.
- // in this case, the extractor can be matched without checking the
measurements.
- //
- // case 2: the pattern may match some measurements of the device.
- // in this case, we can't get all measurements efficiently here,
- // so we just ASSUME the extractor matches and do more checks later.
- matchedExtractors.addAll(extractorsFilteredByDevice);
+ if (deviceID instanceof StringArrayDeviceID
+ && !deviceID.getTableName().startsWith(PATH_ROOT +
PATH_SEPARATOR)) {
Review Comment:
The judgment here seems to be unable to correctly determine whether to use
the table model or the tree model to match
--
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]