shuwenwei commented on code in PR #19198:
URL: https://github.com/apache/iotdb/pull/19198#discussion_r4549527298


##########
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:
   [P2] Preserve DEBUG metadata logs for wide scans
   
   When a `DEBUG SELECT` meets this gate, the batch branch bypasses 
`TimeSeriesMetadataCache.get(..., debug=true)`, and the batch API does not emit 
equivalent cache hit/miss diagnostics. The `totalFieldColumnCount > 1` guard 
only avoids the existing one-field IT case; wide-table DEBUG queries still lose 
these logs. Please keep debug queries on the per-column path or emit equivalent 
diagnostics.



-- 
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]

Reply via email to