Skip to content

fix wrong type validation on unnest expr#10657

Merged
alamb merged 1 commit intoapache:mainfrom
duongcongtoai:fix-10656
May 25, 2024
Merged

fix wrong type validation on unnest expr#10657
alamb merged 1 commit intoapache:mainfrom
duongcongtoai:fix-10656

Conversation

@duongcongtoai
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #10656

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels May 24, 2024
} = original_expr.transform_up(|expr: Expr| {
if let Expr::Unnest(Unnest { expr: ref arg }) = expr {
let (data_type, _) = expr.data_type_and_nullable(input.schema())?;
let (data_type, _) = arg.data_type_and_nullable(input.schema())?;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validation should happen for expr inside unnest, not the unnest expr itself

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 -- thanks @duongcongtoai

@alamb alamb merged commit 1211335 into apache:main May 25, 2024
jayzhan211 pushed a commit to jayzhan211/datafusion that referenced this pull request May 26, 2024
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql SQL Planner sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong error thrown when unnesting a list of struct

2 participants