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

Add generated expression to extra info in Delta Lake #16631

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Mar 20, 2023

Description

Add generated expression to extra info in Delta Lake

Release notes

(x) Release notes are required, with the following suggested text:

# Delta Lake
* Add generated expression to `Extra` column in `DESCRIBE` and `SHOW COLUMNS` results. ({issue}`16631`)

@cla-bot cla-bot bot added the cla-signed label Mar 20, 2023
@ebyhr ebyhr self-assigned this Mar 20, 2023
@github-actions github-actions bot added delta-lake Delta Lake connector tests:hive labels Mar 20, 2023
{
return ColumnMetadata.builder()
.setName(column.getName())
.setType(column.getType())
.setHidden(column.getColumnType() == SYNTHESIZED)
.setComment(Optional.ofNullable(comment))
.setNullable(nullability)
.setExtraInfo(generation == null ? Optional.empty() : Optional.of("generated: " + generation))
Copy link
Member Author

Choose a reason for hiding this comment

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

The expression may contain :. Do we want to just put generated without expression or quote the expression?

Copy link
Member

@findepi findepi Mar 20, 2023

Choose a reason for hiding this comment

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

i think this is fine.

{
return ColumnMetadata.builder()
.setName(column.getName())
.setType(column.getType())
.setHidden(column.getColumnType() == SYNTHESIZED)
.setComment(Optional.ofNullable(comment))
.setNullable(nullability)
.setExtraInfo(generation == null ? Optional.empty() : Optional.of("generated: " + generation))
Copy link
Member

@findepi findepi Mar 20, 2023

Choose a reason for hiding this comment

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

i think this is fine.

@ebyhr ebyhr merged commit 173947a into master Mar 20, 2023
@ebyhr ebyhr deleted the ebi/delta-extra-generated-columns branch March 20, 2023 12:08
@ebyhr ebyhr mentioned this pull request Mar 20, 2023
@github-actions github-actions bot added this to the 411 milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed delta-lake Delta Lake connector
Development

Successfully merging this pull request may close these issues.

2 participants