github-actions[bot] commented on code in PR #65591:
URL: https://github.com/apache/doris/pull/65591#discussion_r3609866932
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AccessPathExpressionCollector.java:
##########
@@ -642,6 +648,7 @@ public Void visitIsNull(IsNull isNull, CollectorContext
context) {
CollectorContext nullContext =
new CollectorContext(context.statementContext,
context.bottomFilter);
nullContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_NULL);
+ nullContext.setType(ColumnAccessPathType.META);
Review Comment:
[P1] Avoid leaf NULL metadata reads for non-nullable Struct fields
`ElementAt` is always expression-nullable because a nullable parent can make
the result NULL, but the selected Struct field itself can be stored
non-nullable. For example, CTAS preserves the `nullable=false` `min`/`max`
fields returned by `ipv4_cidr_to_range`; a later `element_at(s, 'min') IS NULL`
now emits META `[s,min,NULL]`. BE routes that to the scalar `min` iterator,
selects `NULL_MAP_ONLY`, and then `next_batch`/`read_by_rowids` hits
`DORIS_CHECK(is_column_nullable(*dst))` because the pruned child has no
nullable wrapper. Target the nearest nullable ancestor's null map, or retain
DATA when the selected leaf is non-nullable.
--
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]