suharev7 / clickhouse-rs

Asynchronous ClickHouse client library for Rust programming language.
MIT License
324 stars 121 forks source link

Unsupported column type "SimpleAggregateFunction(min, DateTime)" #135

Open let4be opened 3 years ago

let4be commented 3 years ago

I'm trying to insert data into the following table

CREATE TABLE default.domain_discovery (
  shard UInt16,
  domain String,
  updated_at DateTime,

  created_at SimpleAggregateFunction(min, DateTime)
) ENGINE = AggregatingMergeTree() 
PARTITION BY (shard) 
ORDER BY (shard, domain, updated_at)
PRIMARY KEY (shard, domain)

and get error from the library Unsupported column type "SimpleAggregateFunction(min, DateTime)"

Creating a row using row! macro with created_at defined as ch::types::Value::DateTime(now as u32, chrono_tz::UTC)

let4be commented 3 years ago

https://github.com/suharev7/clickhouse-rs/blob/b7f0df499ee1e1390e84c38cf2ccffef3ce7c612/src/types/column/factory.rs#L61

should account for function usage?

suharev7 commented 3 years ago

Support of SimpleAggregateFunction has already been pushed in this repository, and it will be in the next release.