Skip to content

feat: support type cast in SchemaAdapter - #6404

Merged
tustvold merged 4 commits into
apache:mainfrom
e1ijah1:feat/6381/schema-type-cast
May 23, 2023
Merged

feat: support type cast in SchemaAdapter#6404
tustvold merged 4 commits into
apache:mainfrom
e1ijah1:feat/6381/schema-type-cast

Conversation

@e1ijah1

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes#6381

Rationale for this change

What changes are included in this PR?

introduces a map_schema method that maps the file schema to the table schema, and a SchemaMapping structure to hold the mapping and necessary type conversions.

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actionsgithub-actionsBot added the core Core DataFusion crate label May 22, 2023
@alamb
alamb requested a review from tustvoldMay 22, 2023 13:47

@tustvoldtustvold 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.

This is really nice, thank you. Left some minor comments, but this is also good to go as is

Comment threaddatafusion/core/src/physical_plan/file_format/mod.rs Outdated
Comment threaddatafusion/core/src/physical_plan/file_format/mod.rs Outdated
Comment threaddatafusion/core/src/physical_plan/file_format/mod.rs Outdated
Comment threaddatafusion/core/src/physical_plan/file_format/mod.rs Outdated
Comment threaddatafusion/core/src/physical_plan/file_format/mod.rs Outdated
@e1ijah1

Copy link
Copy Markdown
ContributorAuthor

This is really nice, thank you. Left some minor comments, but this is also good to go as is

Thank you for taking the time to review my PR 🙏. I have updated the code. Please take another look.

@e1ijah1
e1ijah1 requested a review from tustvoldMay 23, 2023 07:53

@tustvoldtustvold 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.

Thank you

@tustvold
tustvold merged commit 32d49fb into apache:mainMay 23, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coreCore DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Type Coercion in SchemaAdapter

2 participants

@e1ijah1@tustvold