Skip to content

Fix table properties case sensitivity in CreateDeltaTable #1292

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pluies
Copy link

@Pluies Pluies commented Jul 26, 2022

Description

Resolves #1291

How was this patch tested?

Tested by locally running the patched Delta library and confirming this fixes the issue at hand

Does this PR introduce any user-facing changes?

No

@scottsand-db scottsand-db self-requested a review July 26, 2022 18:08
@@ -317,7 +318,8 @@ case class CreateDeltaTableCommand(
path, tableDesc.partitionColumnNames, existingMetadata.partitionColumns)
}

if (tableDesc.properties.nonEmpty && tableDesc.properties != existingMetadata.configuration) {
if (tableDesc.properties.nonEmpty &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

what happens if I specify some of my table properties with correct capitalization and others lower-case? won't this fail when it should pass?

Copy link
Author

Choose a reason for hiding this comment

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

Hey @allisonport-db ! Sorry about the delay replying here!

This comparison is case-insensitive, so both correctly capitalised table properties and lower-case properties will work, as long as they match the case-insensitively match the existing table properties.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Pluies please add tests for this change. you can add them to DeltaTableCreationTests.scala.

https://github.com/delta-io/delta/blob/master/core/src/test/scala/org/apache/spark/sql/delta/DeltaTableCreationTests.scala

@Pluies
Copy link
Author

Pluies commented Oct 12, 2022

ping @allisonport-db , so that this doesn't fall off the radar :)

Let me know if there's anything else I can do to help this moving forward 👍

@scottsand-db
Copy link
Collaborator

Can you please update the PR description?

@vegarsti
Copy link
Contributor

Can you please update the PR description?

What about the PR description needs updating?

@scottsand-db
Copy link
Collaborator

@vegarsti - I probably commented on the wrong PR :P Terribly sorry, so many to review aha!

@allisonport-db
Copy link
Collaborator

ping @allisonport-db , so that this doesn't fall off the radar :)

Let me know if there's anything else I can do to help this moving forward 👍

Sorry I missed this! Can you add the tests @scottsand-db mentioned?

@Pluies
Copy link
Author

Pluies commented Oct 28, 2022

Indeed, I'm on it! I've been having some issues getting the tests to run but they're finally there, just need to implement them now :)

@allisonport-db
Copy link
Collaborator

Awesome thanks

@Pluies
Copy link
Author

Pluies commented Jan 26, 2023

^ Update on the above, my priorities have shifted and I won't have time to add the proper tests or follow-up on comments here. Happy to leave this PS as open for someone else to take over, or close it for clarity 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Delta table properties should be case-insensitive
4 participants