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


##########
be/src/exec/operator/operator.h:
##########
@@ -946,29 +941,39 @@ class OperatorXBase : public OperatorBase {
     [[nodiscard]] OperatorPtr get_child() { return _child; }
 
     [[nodiscard]] VExprContextSPtrs& conjuncts() { return _conjuncts; }
-    [[nodiscard]] VExprContextSPtrs& projections() { return _projections; }
-    [[nodiscard]] virtual RowDescriptor& row_descriptor() { return 
_row_descriptor; }
+    // Describes the operator's original output before its optional 
projection. For most operators
+    // this is the block returned by get_block(); Scan uses it to describe 
Scanner's unprojected
+    // block because Scan executes the projection before 
ScanOperatorX::get_block_impl().
+    [[nodiscard]] const RowDescriptor& operator_row_desc() const { return 
_row_descriptor; }
 
     [[nodiscard]] int operator_id() const { return _operator_id; }
     [[nodiscard]] int node_id() const override { return _node_id; }
     [[nodiscard]] int nereids_id() const { return _nereids_id; }
 
     [[nodiscard]] int64_t limit() const { return _limit; }
 
-    [[nodiscard]] const RowDescriptor& row_desc() const override {
-        return _output_row_descriptor ? *_output_row_descriptor : 
_row_descriptor;
+    // Describes the final block returned by get_block_after_projects() to 
downstream operators.
+    // Without a projection, the original and final row descriptors are the 
same.
+    [[nodiscard]] const RowDescriptor& row_desc() const {

Review Comment:
   干脆叫 row_desc_after_projection, 之前那个叫row_desc_before_projection 这样一看就明白需要用哪个了



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