ydb icon indicating copy to clipboard operation
ydb copied to clipboard

Missing Passthrough(_yql_preagg_Count0:id) constraint in node AsStruct

Open rvu1024 opened this issue 10 months ago • 0 comments

Fatal: contrib/ydb/library/yql/core/yql_expr_constraint.cpp:3745 CheckExpected(): requirement newConstr failed, message: Rewrite error, missing Passthrough(_yql_preagg_Count0:id) constraint in node AsStruct, code: 1

yqlrun query to reproduce:

USE plato;

insert into @a1
select Just("a"u) as element_type, "b" as id;

insert into @a2
select "b" as id;

commit;

SELECT
    count(DISTINCT(IF(element_type == 'b' , id, null))) as f
FROM concat(@a1, @a2)
;

rvu1024 avatar Apr 24 '24 16:04 rvu1024