Skip to content

[fix](fe) Fix struct field slot type in NestedColumnPruning for OFFSET-only access - #10

Closed
HappenLee wants to merge 10000 commits into
masterfrom
fix-struct-field-slot-type
Closed

HappenLee wants to merge 10000 commits into
masterfrom
fix-struct-field-slot-type

Conversation

@HappenLee

Copy link
Copy Markdown
Owner

Summary

  • fix Fix struct field slot type in NestedColumnPruning for OFFSET-only access

What problem does this PR solve?

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

Check List (For Author)

  • Test: Added test case in string_length_column_pruning.groovy

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.