|
40 | 40 | - do: Multiply Op |
41 | 41 | projection: |- |
42 | 42 | id_ |
| 43 | + decimal_10_0_, decimal_20_2_ |
43 | 44 | decimal_10_0_ * CAST(2 AS DECIMAL(1, 0)) AS comp_1 |
44 | 45 | decimal_20_2_ * CAST(2 AS DECIMAL(1, 0)) AS comp_2 |
45 | 46 | primary-key: id_ |
46 | 47 | non-null: 'true' |
47 | 48 | expect: |- |
48 | | - CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(11, 0),`comp_2` DECIMAL(21, 2)}, primaryKeys=id_, options=()} |
49 | | - DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2469135780, 246913578024691357.80], op=INSERT, meta=()} |
50 | | - DataChangeEvent{tableId=foo.bar.baz, before=[1, 2469135780, 246913578024691357.80], after=[-1, -19753086420, -1975308642197530864.20], op=UPDATE, meta=()} |
51 | | - DataChangeEvent{tableId=foo.bar.baz, before=[-1, -19753086420, -1975308642197530864.20], after=[], op=DELETE, meta=()} |
| 49 | + CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`decimal_10_0_` DECIMAL(10, 0),`decimal_20_2_` DECIMAL(20, 2),`comp_1` DECIMAL(11, 0),`comp_2` DECIMAL(21, 2)}, primaryKeys=id_, options=()} |
| 50 | + DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567890, 123456789012345678.90, 2469135780, 246913578024691357.80], op=INSERT, meta=()} |
| 51 | + DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567890, 123456789012345678.90, 2469135780, 246913578024691357.80], after=[-1, -9876543210, -987654321098765432.10, -19753086420, -1975308642197530864.20], op=UPDATE, meta=()} |
| 52 | + DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543210, -987654321098765432.10, -19753086420, -1975308642197530864.20], after=[], op=DELETE, meta=()} |
52 | 53 | - do: Divide Op |
53 | 54 | projection: |- |
54 | 55 | id_ |
| 56 | + decimal_10_0_, decimal_20_2_ |
55 | 57 | decimal_10_0_ / CAST(2 AS DECIMAL(1, 0)) AS comp_1 |
56 | 58 | decimal_20_2_ / CAST(2 AS DECIMAL(1, 0)) AS comp_2 |
57 | 59 | primary-key: id_ |
58 | 60 | non-null: 'true' |
59 | 61 | expect: |- |
60 | | - CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(16, 6),`comp_2` DECIMAL(24, 6)}, primaryKeys=id_, options=()} |
61 | | - DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 617.283945, 6172839450617.283945], op=INSERT, meta=()} |
62 | | - DataChangeEvent{tableId=foo.bar.baz, before=[1, 617.283945, 6172839450617.283945], after=[-1, -4938.271605, -49382716054938.271605], op=UPDATE, meta=()} |
63 | | - DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4938.271605, -49382716054938.271605], after=[], op=DELETE, meta=()} |
| 62 | + CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`decimal_10_0_` DECIMAL(10, 0),`decimal_20_2_` DECIMAL(20, 2),`comp_1` DECIMAL(16, 6),`comp_2` DECIMAL(24, 6)}, primaryKeys=id_, options=()} |
| 63 | + DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567890, 123456789012345678.90, 617283945.000000, 61728394506172839.450000], op=INSERT, meta=()} |
| 64 | + DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567890, 123456789012345678.90, 617283945.000000, 61728394506172839.450000], after=[-1, -9876543210, -987654321098765432.10, -4938271605.000000, -493827160549382716.050000], op=UPDATE, meta=()} |
| 65 | + DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543210, -987654321098765432.10, -4938271605.000000, -493827160549382716.050000], after=[], op=DELETE, meta=()} |
64 | 66 | - do: Abs Op |
65 | 67 | projection: |- |
66 | 68 | id_ |
|
103 | 105 | - do: Round Op |
104 | 106 | projection: |- |
105 | 107 | id_ |
| 108 | + decimal_10_0_, decimal_20_2_ |
106 | 109 | ROUND(decimal_10_0_, 1) AS comp_1 |
107 | 110 | ROUND(decimal_20_2_, 1) AS comp_2 |
108 | 111 | primary-key: id_ |
109 | 112 | expect: |- |
110 | | - CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(20, 1)}, primaryKeys=id_, options=()} |
111 | | - DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 12345678900, 123456789012345678.9], op=INSERT, meta=()} |
112 | | - DataChangeEvent{tableId=foo.bar.baz, before=[1, 12345678900, 123456789012345678.9], after=[-1, -98765432100, -987654321098765432.1], op=UPDATE, meta=()} |
113 | | - DataChangeEvent{tableId=foo.bar.baz, before=[-1, -98765432100, -987654321098765432.1], after=[], op=DELETE, meta=()} |
114 | | - DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()} |
115 | | - DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()} |
| 113 | + CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`decimal_10_0_` DECIMAL(10, 0),`decimal_20_2_` DECIMAL(20, 2),`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(20, 1)}, primaryKeys=id_, options=()} |
| 114 | + DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567890, 123456789012345678.90, 1234567890, 123456789012345678.9], op=INSERT, meta=()} |
| 115 | + DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567890, 123456789012345678.90, 1234567890, 123456789012345678.9], after=[-1, -9876543210, -987654321098765432.10, -9876543210, -987654321098765432.1], op=UPDATE, meta=()} |
| 116 | + DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543210, -987654321098765432.10, -9876543210, -987654321098765432.1], after=[], op=DELETE, meta=()} |
| 117 | + DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null], op=INSERT, meta=()} |
| 118 | + DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null], after=[], op=DELETE, meta=()} |
0 commit comments