yiguolei commented on code in PR #66472:
URL: https://github.com/apache/doris/pull/66472#discussion_r3764163887


##########
be/src/storage/tablet/tablet_reader.cpp:
##########
@@ -424,31 +320,29 @@ Status TabletReader::_init_orderby_keys_param(const 
ReaderParams& read_params) {
                         _tablet_schema->cluster_key_uids().size());
             }
             for (uint32_t i = 0; i < 
read_params.read_orderby_key_num_prefix_columns; i++) {
-                auto cid = _tablet_schema->cluster_key_uids()[i];
-                auto index = _tablet_schema->field_index(cid);
+                auto uid = _tablet_schema->cluster_key_uids()[i];
+                auto index = _tablet_schema->field_index(uid);
                 if (index < 0) {
                     return Status::Error<ErrorCode::INTERNAL_ERROR>(
                             "could not find cluster key column with 
unique_id=" +
-                            std::to_string(cid) +
+                            std::to_string(uid) +
                             " in tablet schema, tablet_id=" + 
std::to_string(_tablet->tablet_id()));
                 }
-                for (uint32_t idx = 0; idx < _return_columns.size(); idx++) {
-                    if (_return_columns[idx] == index) {
-                        _orderby_key_columns.push_back(idx);
-                        break;
-                    }
+                int32_t ordinal = 
_read_schema->ordinal_by_column(_tablet_schema->column(index));

Review Comment:
   我们可能对于一个tablet column,是always 有column unique id的,不论是否有light weight schema 
change。 可能只有variant的sub column 才有问题



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to