github-actions[bot] commented on code in PR #64180:
URL: https://github.com/apache/doris/pull/64180#discussion_r3381199141
##########
be/src/exprs/vexpr.cpp:
##########
@@ -365,12 +365,9 @@ VExpr::VExpr(const TExprNode& node)
VExpr::VExpr(const VExpr& vexpr) = default;
VExpr::VExpr(DataTypePtr type, bool is_slotref)
- : _opcode(TExprOpcode::INVALID_OPCODE),
- _data_type(get_data_type_with_default_argument(type)) {
- if (is_slotref) {
- _node_type = TExprNodeType::SLOT_REF;
- }
-}
+ : _node_type(is_slotref ? TExprNodeType::SLOT_REF :
TExprNodeType::BOOL_LITERAL),
+ _opcode(TExprOpcode::INVALID_OPCODE),
Review Comment:
`false` is also used by `VirtualSlotRef(const SlotDescriptor*)`, not only by
generic wrappers such as the runtime-filter test `IdentityWrapperExpr`. With
this initializer a descriptor-built `VirtualSlotRef` now returns `BOOL_LITERAL`
from `node_type()` and `false` from `is_virtual_slot_ref()`. Downstream storage
paths dispatch virtual-slot handling from that value, for example
`rebind_storage_expr_to_reader_schema()` and `_extract_common_expr_columns()`,
so such an expression would skip the virtual-slot rebinding/traversal. Please
set the descriptor constructor’s node type to `VIRTUAL_SLOT_REF` (or make this
base constructor take an explicit `TExprNodeType`) and add that assertion to
`VirtualSlotRefTest::ConstructorWithSlotDescriptor`.
--
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]