HappenLee opened a new pull request, #62446:
URL: https://github.com/apache/doris/pull/62446

   Problem Summary: When using struct_element() to access a string field inside 
a struct (e.g., length(struct_element(struct_col, 'f3'))), the 
NestedColumnPruning rule incorrectly returned Optional.empty() for the slot 
type, causing the slot type to become nullable and lose its original type 
information.
   
   The fix changes the return value from Optional.empty() to Optional.of(type) 
when the column is accessed in OFFSET-only mode (e.g., length()), ensuring the 
slot type remains the original type (e.g., varchar).
   
   Release note: None
   
   Test: Added test case in string_length_column_pruning.groovy
   
   
   


-- 
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]

Reply via email to