Skip to content

test: Add sqllogictests for field metadata through coalesce, nvl2 and CASE - #26895

Open
alamb wants to merge 3 commits into
apache:mainfrom
alamb:alamb/case-metadata-slt
Open

alamb wants to merge 3 commits into
apache:mainfrom
alamb:alamb/case-metadata-slt

Conversation

@alamb

@alamb alamb commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

While reviewing #24865 I found that coalesce, nvl, ifnull and nvl2 are rewritten to CASE during simplification, and CASE drops field metadata

This wasn't caught because there was no end user API coverage

These tests document the current behavior end to end so a fix can be verified against them.

What changes are included in this PR?

Add New cases in metadata.slt for coalesce, nvl, ifnull, nvl2 and CASE that document existing behavior with some comments explaining what the expected results are

What is the testing strategy for this PR?

Tests only.

Are there any user-facing changes?

No.

… CASE

Document the current behavior: field metadata (including Arrow extension
types) is dropped by coalesce, nvl, ifnull, nvl2 and CASE expressions.
The intended results are recorded in comments next to each query.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant