-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Not detect SimpleAggregateFunction DataType #69
Comments
Hi. See #51 and docs - you cannot insert directly to table with aggregate function (using any client, not just this one). I recommend creating a "virtual" table (with
and a "Material view" (trigger) which will insert data from the "virtual" table to your actual table:
This way, you can bulk insert into the "virtual" table and the data will automatically flow into regular one |
but i test with dbeaver. insert record successfully done in dbeaver . |
Can you share the insert statement you used? |
drop table if exists test.data_test;
create table test.data_test
(
ts DATETIME,
id VARCHAR,
v0 SimpleAggregateFunction(anyLast,Nullable(Float64)),
v1 SimpleAggregateFunction(anyLast,Nullable(Float64)),
v2 SimpleAggregateFunction(anyLast,Nullable(Float64)),
v3 SimpleAggregateFunction(anyLast,Nullable(Float64)),
p0 SimpleAggregateFunction(anyLast,Nullable(VARCHAR))
) ENGINE=AggregatingMergeTree
PARTITION BY toStartOfQuarter(ts)
ORDER BY (ts,id);
insert into test.data_test values('2019-01-01 00:00:00','id1',null,null,null,null,null);
insert into test.data_test values('2019-01-01 00:00:00','id2',1,1,1,1,'str1');
insert into test.data_test values('2019-01-01 00:00:00','id2',3,3,3,3,'str3');
insert into test.data_test(ts,id,v0,v1,v2) values('2019-01-01 00:00:00','id2',4,2,4);
insert into test.data_test(ts,id,v0,v1,v2) values('2019-01-01 00:00:00','id2',4,4,4);
select * from test.data_test;
select * from test.data_test final;
|
Hm, I didn't realize SimpleAggregateFunction behaves differently from AggregateFunction for insertion. I can add support in that case |
* Adding support for reading/writing SimpleAggregateFunctionType #69 * Added SELECT test
Will be in next release |
Bulk insert not detect datatype of column :
exception like this :
One or more errors occurred. (Unknown type: SimpleAggregateFunction(anyLast, Nullable(Decimal(12, 0))))
The text was updated successfully, but these errors were encountered: