HappenLee commented on code in PR #67896:
URL: https://github.com/apache/doris/pull/67896#discussion_r4002248122


##########
be/src/exprs/vcase_expr.h:
##########
@@ -249,12 +249,22 @@ class VCaseExpr final : public VExpr {
                             then_columns[i].get())
                             ->get_data()
                             .data();
-            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
-                          std::is_same_v<ColumnType, ColumnDateTime> ||
-                          std::is_same_v<ColumnType, ColumnDateV2> ||
-                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
-                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
-                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
+            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
+                          std::is_same_v<ColumnType, ColumnFloat64>) {
+                // Arithmetic masking propagates unselected NaN/Infinity and 
loses signed zero.
+                // Conditional stores also let the compiler vectorize without 
loading from a
+                // selected source/destination pointer, as a ternary 
assignment can do.
+                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
+                    if (then_idx[row_idx] == i) {

Review Comment:
   Updated in 
[d82e48a99dc](https://github.com/apache/doris/pull/67896/commits/d82e48a99dc60c4e692e53ed141210bcbf362df5):
 DATE, DATETIME, DATEV2, DATETIMEV2, TIMESTAMP_NS and TIMESTAMPTZ now share the 
FLOAT/DOUBLE conditional-store loop. All 48 ASAN selection tests pass, covering 
all eight types with both index widths, constants, boundary values, vector 
tails and 255/257 branches.
   
   The default-value initialization is intentionally retained in this PR. It is 
redundant for these direct-store specializations, but removing it is deferred; 
the remaining accumulator paths still require initialization. This update does 
not remove the zero-fill requested by this comment. Resolving the thread with 
that scope decision.



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