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


##########
be/src/information_schema/schema_variables_scanner.cpp:
##########
@@ -86,6 +86,15 @@ Status 
SchemaVariablesScanner::get_next_block_internal(Block* block, bool* eos)
 
 Status SchemaVariablesScanner::_fill_block_impl(Block* block) {
     SCOPED_TIMER(_fill_block_timer);
+    constexpr int num_columns = 4;
+    for (const auto& row : _var_result.variables) {
+        if (row.size() < num_columns) {

Review Comment:
   Please add a focused BE unit test for this new error path. The existing 
variable-table regressions only exercise complete four-field FE rows, so they 
cannot prove the short-row guard that fixes this crash. The schema-scanner UT 
setup can inject `_var_result.variables` directly: cover at least one 0-3-field 
row (ideally after a valid row), assert a non-OK status and zero block rows, 
and keep a four-field boundary case. This verifies that the whole response is 
rejected before any destination column is mutated.



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