761417898 commented on code in PR #643:
URL: https://github.com/apache/tsfile/pull/643#discussion_r2548396937


##########
cpp/src/reader/block/single_device_tsblock_reader.cc:
##########
@@ -82,8 +82,8 @@ int SingleDeviceTsBlockReader::init(DeviceQueryTask* 
device_query_task,
          device_query_task->get_column_mapping()->get_id_columns()) {
         const auto& column_pos_in_result =
             device_query_task->get_column_mapping()->get_column_pos(id_column);
-        int column_pos_in_id =
-            table_schema->find_id_column_order(id_column) + 1;
+        int column_pos_in_id = table_schema->find_id_column_order(id_column) +
+                               (!table_schema->is_virtual_table());

Review Comment:
   int column_pos_in_id = table_schema->find_id_column_order(id_column) + 
                          (table_schema->is_virtual_table() ? 0 : 1);



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