Skip to content

fix: log metadata differences when comparing physical and logical schema - #19070

Merged
alamb merged 1 commit into
apache:mainfrom
kallisti-dev:schema-mismatch-error-display-metadata-diff
Dec 3, 2025
Merged

alamb merged 1 commit into
apache:mainfrom
kallisti-dev:schema-mismatch-error-display-metadata-diff

Conversation

@kallisti-dev

@kallisti-dev kallisti-dev commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Differences in physical/logical schema metadata can cause aggregate physical planning to fail, but these differences are not shown in the error output.

Previous message

Error while planning query: Internal error: Physical input schema should be the same as the one converted from logical input schema. Differences: .`

Example of updated message

Physical input schema should be the same as the one converted from logical input schema. Differences:
        - field metadata at index 0 [usage_idle]: (physical) {"iox::column::type": "iox::column_type::field::float"} vs (logical) {}
        - field metadata at index 1 [usage_system]: (physical) {"iox::column::type": "iox::column_type::field::float"} vs (logical) {}.

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

Minor improvements to error messages.

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @erratic-pattern -- this looks great to me ❤️

@alamb

alamb commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

@erratic-pattern -- it seems like there is a small merge conflict -- can you resolve ?

@kallisti-dev
kallisti-dev force-pushed the schema-mismatch-error-display-metadata-diff branch from 5b441a9 to e3909b6 Compare December 3, 2025 16:36
@kallisti-dev

Copy link
Copy Markdown
Contributor Author

@erratic-pattern -- it seems like there is a small merge conflict -- can you resolve ?

Done.

@alamb

alamb commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Since this is a relatively simple error message improvement I'll just merge it in now. Thanks again @erratic-pattern

@alamb
alamb added this pull request to the merge queue Dec 3, 2025
Merged via the queue into apache:main with commit d4820d1 Dec 3, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Physical input schema should be the same as the one converted from logical input schema." error does not display metadata differences

2 participants