-
Notifications
You must be signed in to change notification settings - Fork 27
Add missing custom properties method and doc for table descriptor builder in C++. Add assertion for custom property in integration test. #336
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,27 +239,30 @@ writer.append(&row)?.await?; | |
|
|
||
| ## `TableDescriptor` | ||
|
|
||
| | Method | Description | | ||
| |----------------------------------------------------|--------------------------------------| | ||
| | `fn builder() -> TableDescriptorBuilder` | Create a table descriptor builder | | ||
| | `fn schema(&self) -> &Schema` | Get the table schema | | ||
| | `fn partition_keys(&self) -> &[String]` | Get partition key column names | | ||
| | `fn has_primary_key(&self) -> bool` | Check if the table has a primary key | | ||
| | `fn properties(&self) -> &HashMap<String, String>` | Get all table properties | | ||
| | `fn comment(&self) -> Option<&str>` | Get table comment | | ||
| | Method | Description | | ||
| |-----------------------------------------------------------|--------------------------------------| | ||
| | `fn builder() -> TableDescriptorBuilder` | Create a table descriptor builder | | ||
| | `fn schema(&self) -> &Schema` | Get the table schema | | ||
| | `fn partition_keys(&self) -> &[String]` | Get partition key column names | | ||
| | `fn has_primary_key(&self) -> bool` | Check if the table has a primary key | | ||
| | `fn properties(&self) -> &HashMap<String, String>` | Get all table properties | | ||
| | `fn custom_properties(&self) -> &HashMap<String, String>` | Get custom properties | | ||
| | `fn comment(&self) -> Option<&str>` | Get table comment | | ||
|
Comment on lines
+249
to
+250
|
||
|
|
||
| ## `TableDescriptorBuilder` | ||
|
|
||
| | Method | Description | | ||
| |----------------------------------------------------------------------------------|---------------------------------------------| | ||
| | `fn schema(schema: Schema) -> Self` | Set the schema | | ||
| | `fn log_format(format: LogFormat) -> Self` | Set log format (e.g., `LogFormat::ARROW`) | | ||
| | `fn kv_format(format: KvFormat) -> Self` | Set KV format (e.g., `KvFormat::COMPACTED`) | | ||
| | `fn property(key: &str, value: &str) -> Self` | Set a table property | | ||
| | `fn partitioned_by(keys: Vec<&str>) -> Self` | Set partition columns | | ||
| | `fn distributed_by(bucket_count: Option<i32>, bucket_keys: Vec<String>) -> Self` | Set bucket distribution | | ||
| | `fn comment(comment: &str) -> Self` | Set table comment | | ||
| | `fn build() -> Result<TableDescriptor>` | Build the table descriptor | | ||
| | Method | Description | | ||
| |-------------------------------------------------------------------------------------------|---------------------------------------------| | ||
| | `fn schema(schema: Schema) -> Self` | Set the schema | | ||
| | `fn log_format(format: LogFormat) -> Self` | Set log format (e.g., `LogFormat::ARROW`) | | ||
| | `fn kv_format(format: KvFormat) -> Self` | Set KV format (e.g., `KvFormat::COMPACTED`) | | ||
| | `fn property(key: &str, value: &str) -> Self` | Set a table property | | ||
| | `fn custom_property(key: impl Into<String>, value: impl Into<String>) -> Self` | Set a single custom property | | ||
| | `fn custom_properties(properties: HashMap<impl Into<String>, impl Into<String>>) -> Self` | Set custom properties | | ||
| | `fn partitioned_by(keys: Vec<&str>) -> Self` | Set partition columns | | ||
| | `fn distributed_by(bucket_count: Option<i32>, bucket_keys: Vec<String>) -> Self` | Set bucket distribution | | ||
| | `fn comment(comment: &str) -> Self` | Set table comment | | ||
| | `fn build() -> Result<TableDescriptor>` | Build the table descriptor | | ||
|
|
||
| ## `TablePath` | ||
|
|
||
|
|
||
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.
The C++ TableDescriptor::Builder has SetLogFormat and SetKvFormat helper methods (as seen in bindings/cpp/include/fluss.hpp lines 415-421), but these are not documented in this API reference table. These methods should be added to the documentation for completeness, similar to how log_format and kv_format are documented for the Rust API.
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.
+1
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.
Since currently, only default format is support. So, not document the api is fine to me