-
Notifications
You must be signed in to change notification settings - Fork 848
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
Can't make partitioning on custom type column #470
Comments
@the20login We'll take a look at this issue. But I wanted to point out that we do support multi-column/level subpartitioning through |
Didn't notice it, my mistake. |
Why it is closed? Yes, I personally didn't use this functionality, but the bug is still there. |
Oh yes you are right! Thank you. |
Some notes as I debug this: The specific error is from src/partitioning.c:167 Backtrace:
|
Previously, if a hypertable dimension type did not have a default hash function, create_hypertable would throw an error. However, this should not be the case if a custom partitioning function is provided. This commit addresses the issue making sure that arbitrary custom types can be used as partitioning dimensions as long as a valid partitioning function is provided. Fixes timescale#470.
Previously, if a hypertable dimension type did not have a default hash function, create_hypertable would throw an error. However, this should not be the case if a custom partitioning function is provided. This commit addresses the issue making sure that arbitrary custom types can be used as partitioning dimensions as long as a valid partitioning function is provided. Fixes #470.
470: update cargo.lock to match cargo.toml r=rtwalker a=rtwalker Should have been included as part of timescale#461 Co-authored-by: Ryan Walker <rwalker@timescale.com>
I've got two columns on which I would like to make subpartitioning. Since timescale supports only one level subpatitioning, I start thinking about custom type. However 'create_hypertable' gives me an error even if I define custom 'partitioning_func'.
As far as I understand, partitioning_func result should be used for hashing/choosing chunk, not original column value, which mean that if 'partitioning_func' is defined, type check should be ommited.
CREATE TYPE composite as (val1 int4, val2 int4);
CREATE FUNCTION composite_type_hash(value ANYELEMENT) RETURNS INT4 /*--some implementation--*/
CREATE TABLE timescale_history ("timestamp" TIMESTAMPTZ, object composite, value TEXT);
SELECT create_hypertable('timescale_history', 'timestamp', 'object', 1000, '1 day', partitioning_func=>'composite_type_hash');
results
ERROR: could not find hash function for type 72761
The text was updated successfully, but these errors were encountered: