-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Disallow writing to Hudi universal format in Delta Lake #22404
Conversation
public static final String APPEND_ONLY_CONFIGURATION_KEY = "delta.appendOnly"; | ||
public static final String COLUMN_MAPPING_MODE_CONFIGURATION_KEY = "delta.columnMapping.mode"; | ||
public static final String COLUMN_MAPPING_PHYSICAL_NAME_CONFIGURATION_KEY = "delta.columnMapping.physicalName"; | ||
public static final String MAX_COLUMN_ID_CONFIGURATION_KEY = "delta.columnMapping.maxColumnId"; | ||
public static final String ISOLATION_LEVEL_CONFIGURATION_KEY = "delta.isolationLevel"; | ||
private static final String DELETION_VECTORS_CONFIGURATION_KEY = "delta.enableDeletionVectors"; | ||
private static final String UNIVERSAL_FORMAT_CONFIGURATION_KEY = "delta.universalFormat.enabledFormats"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this documented at https://github.com/delta-io/delta/blob/master/PROTOCOL.md ?
if not, let's document where this comes from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It comes from https://github.com/delta-io/delta/blob/master/docs/source/delta-uniform.md. I will add a code comment in the next push.
Sounds like a bug in universal format. Maybe we should fix that instead, instead of working around on our side? |
I posted a question on Delta Lake Slack a few hours ago: https://delta-users.slack.com/archives/CJ70UCSHM/p1718614137068649. Let's wait for a reply from the community. |
Received the following reply. They won't update delta protocol:
|
84c4ab1
to
2b517d3
Compare
@@ -195,6 +200,12 @@ public static boolean isDeletionVectorEnabled(MetadataEntry metadataEntry, Proto | |||
return parseBoolean(metadataEntry.getConfiguration().get(DELETION_VECTORS_CONFIGURATION_KEY)); | |||
} | |||
|
|||
public static List<String> enabledUniversalFormats(MetadataEntry metadataEntry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getEnabledUniversalFormats()
?
Clearly the assumption turned out to be invalid. Did they acknowledge that? |
I am OK disallowing the writes without Delta lake protocol change (ie you can merge this PR), but it would be better not to workaround Delta protocol deficiencies on trino side. Also, it's quite possible i just misunderstand. maybe they didn't put this as a writer feature intentionally, because the intent was to allow writes to Delta tables even if Hudi metadata generation is not supported by the writer. Thus, I think -- and prefer -- that we can abstain from this change altogether. As intended by Delta protocol design, we can continue to write to such tables, without updating Hudi compatibility layer. @ebyhr you decide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
Merge @ebyhr ? |
Going to merge as-is to avoid breaking UniForm tables though the ideal fix should be happened in Delta side. |
Description
Hudi universal format isn't managed by reader/writer features unlike icebergCompatV1(2).
We should explicitly deny write operations with delta.universalFormat.enabledFormats configuration.
Fixes #22312
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.