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


##########
be/src/exprs/function/function_encryption.cpp:
##########
@@ -346,8 +346,8 @@ struct EncryptionAndDecryptMultiImpl {
                 offsets_list[i] = &col_str->get_offsets();
                 chars_list[i] = &col_str->get_chars();
             }
-            vector_vector(offsets_list, chars_list, input_rows_count, 
result_data, result_offset,
-                          result_null_map_column->get_data());
+            RETURN_IF_ERROR(vector_vector(offsets_list, chars_list, 
input_rows_count, result_data,

Review Comment:
   This validation is only reached through `vector_vector`, but when the source 
is a column and key, IV, mode, and AAD are all `ColumnConst`, lines 322-329 
call `vector_const` and bypass it. This is user-reachable with `SET 
debug_skip_fold_constant = true`: a mode expression such as `concat('AES_128_', 
'CBC')` survives the FE literal-only legality check and evaluates to a BE 
constant column, after which the non-GCM path still ignores AAD. Please put the 
five-argument mode validation in a path shared by both branches (or validate in 
`vector_const` too) and add a constant-parameter test.



##########
be/src/exprs/function/function_encryption.cpp:
##########
@@ -424,6 +424,12 @@ struct EncryptionAndDecryptMultiImpl {
                 }
             }
 
+            if constexpr (arg_num == 5) {
+                if (!EncryptionUtil::is_gcm_mode(encryption_mode)) {

Review Comment:
   The default nullable wrapper executes this function on nested values before 
restoring the combined input null map, and those nested values are explicitly 
arbitrary at NULL positions. Because this function creates a fresh zeroed 
result null map, a NULL mode row with a hidden `AES_128_CBC` payload reaches 
this check and aborts the block instead of being null-propagated; a following 
valid GCM row is never returned. Please make validation consult the input-null 
mask (or otherwise skip NULL-masked rows) and add a mixed-batch test for this 
case.



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