Gabriel39 commented on code in PR #34675:
URL: https://github.com/apache/doris/pull/34675#discussion_r1597329933


##########
be/src/vec/exec/vset_operation_node.cpp:
##########
@@ -427,19 +419,12 @@ Status 
VSetOperationNode<is_intersect>::extract_build_column(Block& block,
 
         block.get_by_position(result_col_id).column =
                 
block.get_by_position(result_col_id).column->convert_to_full_column_if_const();
-        const auto* column = block.get_by_position(result_col_id).column.get();
-
-        if (const auto* nullable = 
check_and_get_column<ColumnNullable>(*column)) {
-            const auto& col_nested = nullable->get_nested_column();
-            if (_build_not_ignore_null[i]) {
-                raw_ptrs[i] = nullable;
-            } else {
-                raw_ptrs[i] = &col_nested;
-            }
-
-        } else {
-            raw_ptrs[i] = column;
+        if (_build_not_ignore_null[i]) {
+            block.get_by_position(result_col_id).column =
+                    make_nullable(block.get_by_position(result_col_id).column);
         }
+        const auto* column = block.get_by_position(result_col_id).column.get();
+        raw_ptrs[i] = column;

Review Comment:
   ```suggestion
           raw_ptrs[i] = block.get_by_position(result_col_id).column.get();
   ```



##########
be/src/vec/exec/vset_operation_node.cpp:
##########
@@ -155,21 +155,20 @@ Status 
VSetOperationNode<is_intersect>::prepare(RuntimeState* state) {
     auto column_nums = _child_expr_lists[0].size();
     DCHECK_EQ(output_data_types.size(), column_nums)
             << output_data_types.size() << " " << column_nums;
-    // the nullable is not depend on child, it's should use _row_descriptor 
from FE plan
-    // some case all not nullable column from children, but maybe need output 
nullable.
-    vector<bool> nullable_flags(column_nums, false);
-    for (int i = 0; i < column_nums; ++i) {
-        nullable_flags[i] = output_data_types[i]->is_nullable();
-    }
-
     for (int i = 0; i < _child_expr_lists.size(); ++i) {
         RETURN_IF_ERROR(VExpr::prepare(_child_expr_lists[i], state, 
child(i)->row_desc()));
     }
     for (int i = 0; i < _child_expr_lists[0].size(); ++i) {
         const auto& ctx = _child_expr_lists[0][i];
-        _build_not_ignore_null.push_back(ctx->root()->is_nullable());
-        _left_table_data_types.push_back(nullable_flags[i] ? 
make_nullable(ctx->root()->data_type())
-                                                           : 
ctx->root()->data_type());
+        // the nullable is not depend on child, it's should use 
_row_descriptor from FE plan
+        // some case all not nullable column from children, but maybe need 
output nullable.
+        if (output_data_types[i]->is_nullable()) {
+            _build_not_ignore_null.push_back(true);

Review Comment:
   _build_not_ignore_null.push_back(output_data_types[i]->is_nullable())



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