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


##########
be/src/exec/scan/olap_scanner.cpp:
##########
@@ -769,29 +649,27 @@ Status OlapScanner::_init_return_columns() {
                     {unique_id, slot->predicate_access_paths()});
         }
 
-        if ((slot->type()->get_primitive_type() == PrimitiveType::TYPE_STRUCT 
||
-             slot->type()->get_primitive_type() == PrimitiveType::TYPE_MAP ||
-             slot->type()->get_primitive_type() == PrimitiveType::TYPE_ARRAY) 
&&
-            !slot->all_access_paths().empty()) {
-            tablet_schema->add_pruned_columns_data_type(column.unique_id(), 
slot->type());
-        }
-
-        _return_columns.push_back(index);
-        if (slot->is_nullable() && 
!tablet_schema->column(index).is_nullable()) {
-            _tablet_columns_convert_to_null_set.emplace(index);
-        } else if (!slot->is_nullable() && 
tablet_schema->column(index).is_nullable()) {
+        read_columns.push_back(tablet_schema->columns()[index]);
+        expected_types.push_back(slot->get_data_type_ptr());
+        if (!slot->is_nullable() && 
tablet_schema->column(index).is_nullable()) {
             return Status::Error<ErrorCode::INVALID_SCHEMA>(
                     "slot(id: {}, name: {})'s nullable does not match "
                     "column(tablet id: {}, index: {}, name: {}) ",
                     slot->id(), slot->col_name(), tablet_schema->table_id(), 
index,
                     tablet_schema->column(index).name());
         }
+        ++ordinal;
     }
 
-    if (_return_columns.empty()) {
+    if (read_columns.empty()) {
         return Status::InternalError("failed to build storage scanner, no 
materialized slot!");
     }
 
+    // The FE physical scan tuple is the read-path schema. It already includes

Review Comment:
   不兼容旧FE



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