SQL Source Connector fails to map SQL Money type to RisingWave Decimal · Issue #21761 · risingwavelabs/risingwave · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL Source Connector fails to map SQL Money type to RisingWave Decimal type.
Error message/log
risingwave-standalone-1 | 2025-05-07T13:57:06.999433838Z INFO rw-streaming actor{otel.name="Actor 54" actor_id=54 prev_epoch=8479770242056192 curr_epoch=8479770279542784}:executor{otel.name="StreamCdcScan 3600002715"}: risingwave_stream::executor::backfill::cdc::cdc_backfill: start cdc backfill loop table_id=12 upstream_table_name="dbo.ProductPrices" initial_binlog_offset=Some(SqlServer(SqlServerOffset { change_lsn: "0000002c:00000ec8:0022", commit_lsn: "ffffffff:ffffffff:ffff" })) current_pk_pos=None is_snapshot_paused=false
risingwave-standalone-1 |
risingwave-standalone-1 | thread 'rw-streaming' panicked at /risingwave/src/common/src/array/mod.rs:502:29:
risingwave-standalone-1 | type mismatch, array builder type: Decimal, scalar type: Float64
risingwave-standalone-1 | stack backtrace:
risingwave-standalone-1 | 0: rust_begin_unwind
risingwave-standalone-1 | at ./rustc/f9e0239a7bc813b4aceffc7f069f4797cde3175c/library/std/src/panicking.rs:695:5
risingwave-standalone-1 | 1: core::panicking::panic_fmt
risingwave-standalone-1 | at ./rustc/f9e0239a7bc813b4aceffc7f069f4797cde3175c/library/core/src/panicking.rs:75:14
[...]
risingwave-standalone-1 | 149: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
risingwave-standalone-1 | at ./root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.40.0/src/runtime/blocking/pool.rs:476:13
risingwave-standalone-1 | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
risingwave-standalone-1 |
risingwave-standalone-1 |risingwave-standalone-1 | *** await tree context of current task ***
risingwave-standalone-1 |
risingwave-standalone-1 | Actor 54: `productprices` [1.425s]
risingwave-standalone-1 | Epoch 8479770345340928 [421.000ms]
risingwave-standalone-1 | StreamCdcScan 3600002715 [421.000ms]
risingwave-standalone-1 | backfill_snapshot_read [421.000ms] <== current
risingwave-standalone-1 | Merge 360000271E [421.000ms]
risingwave-standalone-1 | LocalInput (actor 55) [421.000ms]
risingwave-standalone-1 |
To Reproduce
Create a SQL Source connector with the Debezium parameterdebezium.decimal.handling.mode = 'double'
CREATE SOURCE IF NOT EXISTS sqlserver WITH (
connector = 'sqlserver-cdc',
hostname = 'mssql',
port = '1433',
username = 'sa',
password = 'YourStrong@Passw0rd',
database.name = 'DemoDB',
database.encrypt = 'true',
debezium.tombstones.on.delete = 'false',
debezium.decimal.handling.mode = 'double',
debezium.time.precision.mode = 'connect',
);
Create a MSSQL Table with a column of type Money
CREATE TABLE ProductPrices (
id INT IDENTITY(1, 1) PRIMARY KEY,
price MONEY
);
Create a RW Table and map the SQL Money column to a RW decimal column:
CREATE table if not exists ProductPrices (
id int,
price decimal,
CONSTRAINT pk_ProductPrices PRIMARY KEY (id)
)
WITH (snapshot = 'true')
FROM sqlserver TABLE 'DemoDB.dbo.ProductPrices';
Expected behavior
I except RW to correctly handle SQL Money type and the RW table to be successfully filled in.
How did you deploy RisingWave?
I've seen the bug in both my Docker-Compose and Kubernetes environments.
let datum = match row.try_get::<ScalarImplTiberiusWrapper,usize>(i){
Ok(datum) => datum.map(|d| d.0),
Err(err) => {
log_error!(name, err,"parse column failed");
None
}
};
datums.push(datum);
}
OwnedRow::new(datums)
}
Debezium handles incremental data while Rust code (tiberius here) handles existing (backfilling) part, which may have different type mapping. Especially that the behavior of type mapping can be changed via Debezium config, while the corresponding backfill process is not aware of this.
Describe the bug
SQL Source Connector fails to map SQL Money type to RisingWave Decimal type.
Error message/log
To Reproduce
debezium.decimal.handling.mode = 'double'
Money
Money
column to a RWdecimal
column:Expected behavior
I except RW to correctly handle SQL Money type and the RW table to be successfully filled in.
How did you deploy RisingWave?
I've seen the bug in both my Docker-Compose and Kubernetes environments.
My Docker-Compose is build as follows:
PostgreSQL 13.14.0-RisingWave-2.3.0 (e8f053e)
The text was updated successfully, but these errors were encountered: