[elixir] feat: Allow comment and custom_properties on create_database#597
Open
nicolazar wants to merge 1 commit into
Open
[elixir] feat: Allow comment and custom_properties on create_database#597nicolazar wants to merge 1 commit into
nicolazar wants to merge 1 commit into
Conversation
Thread an optional DatabaseDescriptor through Fluss.Admin.create_database so callers can set a database comment and custom properties at creation time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #587
Brief change log
This PR allows callers to set a database
commentandcustom_propertieswhen creating a database, via an optionalFluss.DatabaseDescriptor:Previously
admin_create_databasehard-coded the descriptor to None, so the only way to observe a descriptor was to read one back viaget_database_info/2(#586). This closes that gap on the write side.We now change the
create_databasefunction to accept a descriptor as the third positional argument, beforeignore_if_exists.Tests
Added unit tests for the builder helpers (happy paths, overwrites, cross-field preservation, guard/validation failures) and integration tests for
create_database/3with a descriptor (comment-only, properties-only, struct-directly), asserting the values round-trip throughget_database_info/2.Additionally, strengthened the existing
get_database_info/2test to assert descriptor values rather than just shape.API and Format
The signature of admin
create_database/3function has been changed: previously it meantcreate_database(admin, name, ignore_if_exists). It now meanscreate_database(admin, name, descriptor). Callers that passedignore_if_existspositionally as the third argument must move it to the fourth. The three in-repo callers have been updated.