morrySnow commented on code in PR #32248:
URL: https://github.com/apache/doris/pull/32248#discussion_r1525729038


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PlanTranslatorContext.java:
##########
@@ -287,16 +287,19 @@ public SlotDescriptor createSlotDesc(TupleDescriptor 
tupleDesc, SlotReference sl
             slotDescriptor.setLabel(slotReference.getName());
         } else {
             slotRef = new SlotRef(slotDescriptor);
-            if (slotReference.hasSubColPath()) {
-                slotDescriptor.setSubColLables(slotReference.getSubColPath());
-                
slotDescriptor.setMaterializedColumnName(slotRef.getColumnName()
-                            + "." + String.join(".", 
slotReference.getSubColPath()));
-            }
         }
         slotRef.setTable(table);
         slotRef.setLabel(slotReference.getName());
         this.addExprIdSlotRefPair(slotReference.getExprId(), slotRef);
-        slotDescriptor.setIsNullable(slotReference.nullable());
+        if (slotReference.hasSubColPath()) {
+            slotDescriptor.setSubColLables(slotReference.getSubColPath());
+            slotDescriptor.setMaterializedColumnName(slotRef.getColumnName()
+                        + "." + String.join(".", 
slotReference.getSubColPath()));
+            // always nullable at present
+            slotDescriptor.setIsNullable(true);

Review Comment:
   if variant slot always nullable, u should set it correctly in Nereids, 
because nereids need nullable info todo some optimization. if u set uncorrect 
nullable info, we will get wrong plan sometimes



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to