Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support coercion within union type for ORC format #12520

Merged
merged 1 commit into from Jun 13, 2022

Conversation

Felicity-3786
Copy link
Contributor

@Felicity-3786 Felicity-3786 commented May 23, 2022

Co-authored-by: Pratham Desai prathamd94@gmail.com

Description

This PR adds support for union-type coercion in ORC format. Mainly two changes here:

  • Allow struct-like coercion during table-partition compatibility check
  • Adapt reader to convert data to comply with table schema

Is this change a fix, improvement, new feature, refactoring, or other?

It's a fix for Trino queries with table/partition mismatch errors.
The reason is that even though unions are treated as structs, union coercion isn't handled.

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Hive Plugin

How would you describe this change to a non-technical end user or system administrator?

This PR handles the schema evolution for union-type(struct), coercion policy is added for ORC format.

Related issues, pull requests, and links

Documentation

( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Hive Connector
* Fix schema evolution support within fields of union typed columns. ({issue}`12520`)

@cla-bot cla-bot bot added the cla-signed label May 23, 2022
@Felicity-3786 Felicity-3786 changed the title upport coercion within union type for ORC format Support coercion within union type for ORC format May 23, 2022
Copy link
Member

@phd3 phd3 left a comment

Choose a reason for hiding this comment

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

Looks good, mostly minor comments

@Felicity-3786 Felicity-3786 force-pushed the union_type branch 2 times, most recently from 3d4db00 to 1afcd15 Compare June 7, 2022 19:45
@phd3
Copy link
Member

phd3 commented Jun 9, 2022

@Felicity-3786 can you please take a look at CI failures

Copy link
Member

@phd3 phd3 left a comment

Choose a reason for hiding this comment

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

thanks, just one minor comment

Co-authored-by: Pratham Desai <prathamd94@gmail.com>
@phd3 phd3 merged commit e071da4 into trinodb:master Jun 13, 2022
@phd3
Copy link
Member

phd3 commented Jun 13, 2022

Merged, thanks!

@github-actions github-actions bot added this to the 386 milestone Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants