SummingMergeTree support for DateTime64

This commit is contained in:
Jordi Villar 2023-06-09 15:36:48 +02:00
parent d4602f7e1f
commit f8791a0ea3
3 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,8 @@ public:
bool canBeUsedAsVersion() const override { return true; }
bool isSummable() const override { return false; }
protected:
SerializationPtr doGetDefaultSerialization() const override;
};

View File

@ -0,0 +1 @@
1 2023-05-01 23:55:55.100 15

View File

@ -0,0 +1,12 @@
DROP TABLE IF EXISTS summing_merge_tree_datetime64;
CREATE TABLE summing_merge_tree_datetime64 ( `pk` UInt64, `timestamp` DateTime64(3), `value` UInt64 )
ENGINE = SummingMergeTree() ORDER BY pk;
INSERT INTO summing_merge_tree_datetime64 SELECT 1 pk, '2023-05-01 23:55:55.100' timestamp, 1 value;
INSERT INTO summing_merge_tree_datetime64 SELECT 1 pk, '2023-05-01 23:55:55.100' timestamp, 2 value;
INSERT INTO summing_merge_tree_datetime64 SELECT 1 pk, '2023-05-01 23:55:55.100' timestamp, 3 value;
INSERT INTO summing_merge_tree_datetime64 SELECT 1 pk, '2023-05-01 23:55:55.100' timestamp, 4 value;
INSERT INTO summing_merge_tree_datetime64 SELECT 1 pk, '2023-05-01 23:55:55.100' timestamp, 5 value;
SELECT * FROM summing_merge_tree_datetime64 FINAL;