github-actions[bot] commented on code in PR #70688:
URL: https://github.com/apache/doris/pull/70688#discussion_r4637960294


##########
be/src/service/point_query_executor.cpp:
##########
@@ -199,6 +215,21 @@ Status Reusable::init(const TDescriptorTable& t_desc_tbl, 
const std::vector<TExp
     return Status::OK();
 }
 
+Status Reusable::materialize_virtual_columns(Block* block) const {
+    if (block->rows() == 0) {
+        return Status::OK();
+    }
+
+    for (const auto& [pos, expr_ctx] : _virtual_column_exprs) {

Review Comment:
   [P1] Load physical inputs of virtual slots before materializing point-query 
expressions. `materialize_virtual_columns()` now executes each virtual 
expression directly, but `extract_slot_ref()` only records `SLOT_REF` nodes and 
skips the underlying tree of a `VIRTUAL_SLOT_REF`. On a table with 
`row_store_columns` (partial row store), `_missing_col_uids` therefore omits 
the input columns; JSONB decoding and the column-store fallback leave them 
empty, so this execute returns a zero-length/error result instead of the row. 
Include every virtual expression's physical input UIDs in the point-query load 
sets and add a partial-row-store regression.



##########
be/src/service/point_query_executor.cpp:
##########
@@ -199,6 +215,21 @@ Status Reusable::init(const TDescriptorTable& t_desc_tbl, 
const std::vector<TExp
     return Status::OK();
 }
 
+Status Reusable::materialize_virtual_columns(Block* block) const {
+    if (block->rows() == 0) {
+        return Status::OK();
+    }
+
+    for (const auto& [pos, expr_ctx] : _virtual_column_exprs) {
+        ColumnPtr result_column;
+        RETURN_IF_ERROR(expr_ctx->execute(block, result_column));

Review Comment:
   [P1] Materialize nested virtual slots in dependency order. 
`_virtual_column_exprs` is an `unordered_map`, but a virtual alias can contain 
a `VirtualSlotRef` to another extracted alias after the CSE rewrite. Because 
point-query blocks now start with ordinary typed-empty columns, 
`VirtualSlotRef` no longer recurses (it only does so for `ColumnNothing`); if 
the outer alias is visited first, its inner input has zero rows and `execute()` 
returns a size-mismatch/error. Topologically materialize dependencies or retain 
a local marker until each dependency is ready, and add a nested-CSE point-query 
regression.



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