forked from bersler/OpenLogReplicator
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Version: d167b033 (master, based on upstream v1.9.0)
Description
Three numeric type issues found by comparing Debezium OLR adapter output against Debezium LogMiner adapter output for the same Oracle redo data.
Issue A: BINARY_FLOAT columns output as null
OLR outputs null for every BINARY_FLOAT column value. LogMiner outputs the correct float.
| Input | LogMiner | OLR |
|---|---|---|
0 |
0.0 |
null |
1 |
1.0 |
null |
256.0 |
256.0 |
null |
Issue B: BINARY_DOUBLE truncated to 6 significant digits
BuilderJson.cpp:columnDouble() uses std::ostringstream ss; ss << value; without setting precision. The default is 6 significant digits.
| Input | LogMiner | OLR |
|---|---|---|
65536.125 |
65536.125 |
65536.1 |
3.14159265358979... |
3.141592653589793 |
3.14159 |
Same issue in columnFloat().
Issue C: NUMBER with >16 significant digits loses precision
Oracle NUMBER supports up to 38 significant digits, but OLR truncates to ~16, consistent with conversion through a double intermediate.
| Column | Input | LogMiner | OLR |
|---|---|---|---|
NUMBER(20,10) |
9999999999.9999999999 |
9999999999.9999999999 |
10000000000 (rounded) |
NUMBER(20,10) |
1234567890.1234567890 |
1234567890.123456789 |
1234567890.1234567 |
NUMBER |
3.1415926535... (35 digits) |
full 35 digits | 16 digits |
Values fitting within 16 significant digits are correct.
Steps to reproduce
- Create table with numeric types:
CREATE TABLE TEST_NUMBERS (
id NUMBER PRIMARY KEY,
col_number NUMBER,
col_decimal NUMBER(20,10),
col_float BINARY_FLOAT,
col_double BINARY_DOUBLE
);
ALTER TABLE TEST_NUMBERS ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
INSERT INTO TEST_NUMBERS VALUES (1,
3.14159265358979323846264338327950288,
9999999999.9999999999,
256.0,
65536.125);
COMMIT;- Run OLR with
format.type: "debezium"or"json" - Compare output against LogMiner for the same redo
Expected result
- BINARY_FLOAT:
256.0 - BINARY_DOUBLE:
65536.125 - NUMBER(20,10):
9999999999.9999999999(or equivalent BigDecimal encoding) - NUMBER: full 35 digits of pi
Actual result
- BINARY_FLOAT:
null - BINARY_DOUBLE:
65536.1(6 significant digits) - NUMBER(20,10):
10000000000(rounded to 16 digits) - NUMBER:
3.141592653589793(16 digits)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels