ydb-platform / ydb

YDB is an open source Distributed SQL Database that combines high availability and scalability with strong consistency and ACID transactions
https://ydb.tech
Apache License 2.0
4.02k stars 581 forks source link

Нет поддержки Decimal в KQP #6320

Open iddqdex opened 4 months ago

iddqdex commented 4 months ago

Связано: https://github.com/ydb-platform/ydb/issues/6269

<main>: Error: ydb/library/yql/minikql/computation/mkql_block_impl.cpp:205: ToValueDescr(): requirement ConvertInputArrowType(type, ret) failed. can't get arrow type
<main>: Error: Query invalidated on scheme/internal error during Data execution, code: 2019

Query text:
$z1_12 = cast(1 as decimal(22,9));
select
    l_returnflag,
    l_linestatus,
    sum(l_quantity) as sum_qty,
    sum(l_extendedprice) as sum_base_price,
    sum(l_extendedprice * ($z1_12 - l_discount)) as sum_disc_price,
    sum(l_extendedprice * ($z1_12 - l_discount) * ($z1_12 + l_tax)) as sum_charge,
    avg(l_quantity) as avg_qty,
    avg(l_extendedprice) as avg_price,
    avg(l_discount) as avg_disc,
    count(*) as count_order
from
    `/olap-testing-vla-common2/kikimr/apkobzev/test/decimal/tpch/s1/lineitem`
where
    l_shipdate <= Date('1998-12-01') - Interval("P100D")
group by
    l_returnflag,
    l_linestatus
order by
    l_returnflag,
    l_linestatus;

Как воспроизвести:

./ydb -e grpc://c0fbrdjnem92d2p2q5jn.cluster.testing.ydb.yandex.net:2135 -d /olap-testing-vla-common2/kikimr/apkobzev/test workload tpch -p decimal/tpch/s1 run  --float-mode decimal_ydb --include 1
iddqdex commented 4 months ago

Ожидаем фикс тут: https://github.com/ydb-platform/ydb/pull/6151

iddqdex commented 4 months ago

Возможно связано с https://github.com/ydb-platform/ydb/issues/5981