Skip to content
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

Skip sharding for versioned kv with one shard #708

Open
yl-lisen opened this issue May 13, 2024 · 0 comments · May be fixed by #709
Open

Skip sharding for versioned kv with one shard #708

yl-lisen opened this issue May 13, 2024 · 0 comments · May be fixed by #709
Assignees
Labels
enhancement New feature or request

Comments

@yl-lisen
Copy link
Collaborator

Describe what enhancement you'd like to have

CREATE STREAM kv(id int64, value float) primary key id settings mode='versioned_kv';

--- actual default sharding expression is 
CREATE STREAM default.kv
(
  `id` int64,
  `value` float32,
  `_tp_time` datetime64(3, 'UTC') DEFAULT now64(3, 'UTC') CODEC(DoubleDelta, LZ4),
  INDEX _tp_time_index _tp_time TYPE minmax GRANULARITY 2
)
ENGINE = Stream(1, 1, weak_hash32(id))
PARTITION BY to_YYYYMMDD(_tp_time)
PRIMARY KEY id
ORDER BY id
SETTINGS mode = 'versioned_kv', index_granularity = 8192

For one shard, we can skip sharding by weak_hash32

@yl-lisen yl-lisen added the enhancement New feature or request label May 13, 2024
@yl-lisen yl-lisen self-assigned this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant