Copilot commented on code in PR #64572:
URL: https://github.com/apache/doris/pull/64572#discussion_r3421487340
##########
be/src/exec/common/variant_util.cpp:
##########
@@ -103,6 +103,18 @@
namespace doris::variant_util {
+static bool can_ignore_missing_column_for_variant_stats(const TabletColumn&
column,
+ const Status& st) {
+ if (!st.is<ErrorCode::NOT_FOUND>()) {
+ return false;
+ }
+ if (column.is_nullable()) {
+ return true;
+ }
+ auto default_value = column.default_value();
+ return column.has_default_value() && (default_value == "NULL" ||
default_value == "null");
+}
Review Comment:
This helper currently ignores *any* missing column if `column.is_nullable()`
is true, even when the column has a non-NULL default. That expands behavior
beyond the PR description (‘nullable/default-NULL’) and can silently drop
stats/extended-info contributions for rows that should be treated as a constant
default value. Consider tightening the condition to only ignore when the
missing column would be materialized as NULL by default-column behavior (e.g.,
nullable with no default OR default is NULL), and keep NOT_FOUND as an error
for nullable columns with a non-NULL default.
--
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]