pythaac commented on code in PR #10562:
URL: https://github.com/apache/gravitino/pull/10562#discussion_r3088102635
##########
docs/jdbc-clickhouse-catalog.md:
##########
@@ -240,8 +240,31 @@ If you need Gravitino to manage an existing cluster
database or table, recreate
- `PRIMARY_KEY`
- Data-skipping indexes:
- - `DATA_SKIPPING_MINMAX` (`GRANULARITY` fixed to 1)
- - `DATA_SKIPPING_BLOOM_FILTER` (`GRANULARITY` fixed to 3)
+ - `DATA_SKIPPING_MINMAX`
+ - `DATA_SKIPPING_BLOOM_FILTER`
+
+#### Properties
+
+For data-skipping indexes, Gravitino supports catalog-specific index
`properties`.
+
+##### `granularity`
+
+| Property Name | Description | Validation
|
+|----------------|-----------------------------------------|----------------------------------------------------------------------------|
+| `granularity` | Maps to ClickHouse `GRANULARITY` clause | Property key must
be lowercase `granularity`; value must be a positive integer |
+
+Defaults by index type:
+
+| Index Type | Default `granularity` | Notes
|
+|--------------------------------|------------------------|----------------------------------------------------|
+| `DATA_SKIPPING_MINMAX` | `1` | Used when
`properties.granularity` is not provided |
+| `DATA_SKIPPING_BLOOM_FILTER` | `3` | Used when
`properties.granularity` is not provided |
+
+Behavior:
+
+- If `properties.granularity` is provided, the configured value is used for
`CREATE TABLE` and `ALTER TABLE ... ADD INDEX`.
+- If `properties.granularity` is not provided, Gravitino uses the default
value for each index type.
+- On table load, Gravitino reads ClickHouse index metadata and returns the
effective `granularity` in index properties for supported data-skipping indexes.
Review Comment:
As mentioned earlier comment, granularity must not be blank. So `loadTable`
is always supposed to get the granularity, which means the document is correct.
However, it should be remained to check whether granularity is blank for in
case.
Please let me know if you have another thought🙂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]