ColinLeeo commented on code in PR #19198:
URL: https://github.com/apache/iotdb/pull/19198#discussion_r4549558367
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.java:
##########
@@ -348,13 +358,36 @@ private static AbstractAlignedTimeSeriesMetadata
loadAlignedTimeSeriesMetadataFr
// when resource.getTimeIndexType() == 1, TsFileResource.timeIndexType is
deviceTimeIndex
// we should not ignore the non-exist of device in TsFileMetadata
+ boolean ignoreNotExists =
+ context.ignoreNotExistsDevice()
+ || resource.getTimeIndexType() == ITimeIndex.FILE_TIME_INDEX_TYPE;
+
+ // For a wide device (a table scan that selects almost all field columns),
deserialize the
+ // whole device's TimeSeriesMetadata in a single batch read instead of
walking the device
+ // metadata index once per column. External tsfiles address metadata by
offset, so they must
+ // stay on the per-column path.
+ if (rootMeasurementMetadataIndexNodeOffset == null
Review Comment:
DEBUG queries now stay on the per-column path: the batch gate takes `debug`
and `offsetAddressed` explicitly, so `DEBUG SELECT` keeps the
`TimeSeriesMetadataCache.get(..., debug=true)` hit/miss diagnostics, and the
gating unit test covers both cases.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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]