morrySnow commented on code in PR #12003:
URL: https://github.com/apache/doris/pull/12003#discussion_r953316452
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/SortInfo.java:
##########
@@ -271,6 +271,11 @@ public ExprSubstitutionMap createSortTupleInfo(
*/
public ExprSubstitutionMap createMaterializedOrderExprs(
TupleDescriptor sortTupleDesc, Analyzer analyzer) {
+ // the sort node exprs may come from the child outer join node
+ // we need change the slots to nullable from all outer join nullable
side temporarily
+ // then the sort node expr would have correct nullable info
+ // after create the output tuple we need revert the change by call
analyzer.changeSlotsToNotNullable(slots)
+ List<SlotDescriptor> slots =
analyzer.changeSlotToNullableOfOuterJoinedTuples();
Review Comment:
nit: maybe we could wrap these two helper function into a closable resource
and use try statement to do auto change back to avoid unpaired use
--
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]