e
Size: a a a
e
МБ
e
МБ
e
МБ
МБ
e
ТИ
`amount_currency` Decimal128(2),
`currency_rate` Decimal128(2),
`amount` Decimal128(2) MATERIALIZED if(payment_currency_code = '643', amount_currency, amount_currency*currency_rate),
данные не вставляются в таблицу, выходит ошибка Conditional functions with different Decimal scales при вычислении значения amountSC
DT
`amount_currency` Decimal128(2),
`currency_rate` Decimal128(2),
`amount` Decimal128(2) MATERIALIZED if(payment_currency_code = '643', amount_currency, amount_currency*currency_rate),
данные не вставляются в таблицу, выходит ошибка Conditional functions with different Decimal scales при вычислении значения amountSELECT
CAST(1, 'Decimal128(2)') AS x,
toTypeName(x * x) AS type
Query id: a1db6dd4-4433-40d0-9e9d-0feb5e7cdd88
┌────x─┬─type───────────┐
│ 1.00 │ Decimal(38, 4) │
└──────┴────────────────┘
КТ
КТ
DT
КТ
`amount_currency` Decimal128(2),
`currency_rate` Decimal128(2),
`amount` Decimal128(2) MATERIALIZED if(payment_currency_code = '643', amount_currency, amount_currency*currency_rate),
данные не вставляются в таблицу, выходит ошибка Conditional functions with different Decimal scales при вычислении значения amount`amount` Decimal128(2) MATERIALIZED if(payment_currency_code = '643', amount_currency, amount_currency*currency_rate),
меняем на
`amount` Decimal128(2) MATERIALIZED if(payment_currency_code = '643', amount_currency, toDecimal128(mount_currency*currency_rate,2)),
ТИ
ТИ
RT
RT
RT