[elixir] feat: Support full table descriptor options in create_table#647
Open
nicolazar wants to merge 1 commit into
Open
[elixir] feat: Support full table descriptor options in create_table#647nicolazar wants to merge 1 commit into
nicolazar wants to merge 1 commit into
Conversation
This commit brings the Elixir's create_table descriptor to full parity
with the native builder by also supporting :bucket_keys,
:partition_keys, :custom_properties & comment.
The optional fields are bundled into a Fluss.TableDescriptor.Options struct
decoded across the NIF boundary as a NifStruct (NifTableOptions), rather than
growing table_descriptor_new to seven positional arguments. This mirrors the
existing NifDatabaseDescriptor pattern and the Python binding, which builds the
core descriptor with unconditional .properties / .custom_properties /
.partitioned_by / .distributed_by calls.
:properties is now a map (was a list of {k, v} tuples), fixing a write/read
asymmetry — get_table_info already reports properties as a map — and matching
:custom_properties.
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
This PR brings the Elixir's
create_tabledescriptor to full parity with the native builder by also supporting:bucket_keys,:partition_keys,:custom_properties&comment, in addition tobucket_countandproperties. These options are already surfaced on the read side in #640.Linked issue: close #642
Brief change log
Fluss.TableDescriptor.new!/2.Fluss.TableDescriptor.Optionsstruct, decoded across the NIF as aNifStruct(NifTableOptions) instead of a long positional NIF signature..properties/.custom_properties/.partitioned_by/.distributed_bycalls:propertiesfrom a list of{k, v}tuples to a map, matching:custom_propertiesand the map already returned byget_table_info.Tests
New unit tests for the all-options constructions and integration tests which round-trips
comment,custom_properties, explicitbucket_keys, andpartition_keysviaget_table_info.API and Format
Elixir-only API change.
:propertieschanges from a keyword/tuple list to a map for parity with the read side; no existing caller passed:properties.Documentation