goutamadwant opened a new issue, #13710:
URL: https://github.com/apache/seatunnel/issues/13710
### Search before asking
- [x] I had searched in the issues and found no similar issues.
### What happened
`DebeziumRowConverter` (`seatunnel-format-json`, dev `0bef81d003`) decodes
every textual DECIMAL node as Debezium `precise` mode: base64 unscaled bytes
plus the column scale. A Debezium connector running with
`decimal.handling.mode=string` emits the decimal literal instead.
- Expected: `"amount":"123.45"` is read as 123.45 and `"qty":"1234"` as 1234.
- Actual: `"123.45"` is not valid base64, so the row fails with `Invalid
bytes for Decimal field`; the Kafka source always ignores parse errors for
`debezium_json`, so the row is dropped silently. `"1234"` is valid base64
(digits only, length 4), so it is decoded as the bytes `D7 6D F8` and becomes
-26588.24 with no error.
The reader cannot tell the two encodings apart on its own: a digits-only
literal of length 4, 8, 12 is also valid base64, and a `precise` value whose
base64 happens to be all digits (about 1 in 1700 three-byte values) would be
misread the other way. Debezium itself needs `decimal.handling.mode`; the
format needs the same hint.
### SeaTunnel Version
dev (`0bef81d003`), 3.1.0
### SeaTunnel Config
```hocon
source {
Kafka {
bootstrap.servers = "kafka:9092"
topic = "dbserver1.inventory.orders"
format = debezium_json
debezium_record_include_schema = false
schema = {
fields {
id = int
amount = "decimal(10, 2)"
qty = "decimal(10, 0)"
}
}
}
}
```
Debezium connector: `decimal.handling.mode = string`,
`value.converter.schemas.enable = false`.
### Running Command
```shell
./bin/seatunnel.sh -c config/orders.conf
```
### Error Exception
```
java.lang.RuntimeException: Invalid bytes for Decimal field
Caused by: InvalidFormatException: Cannot access contents of TextNode as
binary due to broken Base64 encoding: Illegal character '.' (code 0x2e) in
base64 content
```
Only visible with the Amazon SQS source (`ignore_parse_errors = false`).
With the Kafka source the row is skipped without a log line, and `"1234"`
arrives as -26588.24.
### Zeta or Flink or Spark Version
Zeta
### Java or Scala Version
11
### Screenshots
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://www.apache.org/foundation/policies/conduct).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]