diff options
| author | cherepashka <[email protected]> | 2025-12-04 20:38:46 +0300 |
|---|---|---|
| committer | cherepashka <[email protected]> | 2025-12-04 21:10:41 +0300 |
| commit | 0c616ba24598595c4b78d509fc7ef36d0170b48c (patch) | |
| tree | dbe05a14e0922c219787e72a76732e7cbf73679b /library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp | |
| parent | 84da188d0d1186c3541ea1d154554fa023f3b9ab (diff) | |
YT-24418: Add constrained table schema
* Changelog entry
Type: feature
Component: master
Introduce constraints for columns in table node schema on master side
API:
Create and Alter Table commands will have 2 more parameters: `constrained_schema` and `constraints`. The first parameter represents usual schema with columns marked by constraints, for example: `[{"constraint": "BETWEEN 0 AND 60", "name": "minute", "stable_name": "_minute", "type": "int64", "sort_order": "ascending"}, {"constraint": "BETWEEN 0 AND 23", "name": "hour", "type": "int64"}]`. The second parameter represents mapping between name of column into constraint, for example: `{"minute": "BETWEEN 0 AND 60", "hour": "BETWEEN 0 AND 23"}`. Addition of `constrained_schema` allows us to save the old behavior with altering tables and avoid inadvertent removals of constraints which would inevitably arise from mixing up new (constained) and old (unconstrained) schemas. Addition of `constraints` parameter will allow users to add constraints even if they didn't want to change schema of table.
Tables will have 2 more attributes: `@constrained_schema` and `@constraints`. They are just similar to new parameters in create and alter-tables commands.
Deduplication of schemas will work as before: schemas with no constraints will be deduplicated by `@schema_id`. Constraints from schemas will not be deduplicated yet (by `@constraints_id`), this feature will be supported in future PRs.
commit_hash:eda85e01afc0e89398196327c5b5de7f334e96c0
Diffstat (limited to 'library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp')
0 files changed, 0 insertions, 0 deletions
