Describe the bug
Custom query row validation on Db2 loses precision and scale. In Backend._metadata we do have precision and scale in cursor.description:
(Pdb) p cursor.description
[['COL_INT64', DBAPITypeObject({'BIGINT'}), 20, 20, 19, 0, True],
['COL_DEC_10_2', DBAPITypeObject({'NUMERIC', 'NUM', 'DEC', 'DECIMAL'}), 12, 12, 10, 2, True],
['COL_DATE', DBAPITypeObject({'DATE'}), 10, 10, 10, 0, True]]
But not after _get_type has processed it:
(Pdb) p [(column[0].lower(), _get_type(column[1])) for column in cursor.description]
[('col_int64', <class 'ibis.expr.datatypes.core.Int64'>),
('col_dec_10_2', <class 'ibis.expr.datatypes.core.Decimal'>),
('col_date', <class 'ibis.expr.datatypes.core.Date'>)]
What version of DVT are you using?
8.5.1
What type of connections are you using for source and target?
Db2
Steps to reproduce the behavior
Add col_dec_10_2 to Db2 test test_custom_query_row_concat_validation_core_types_to_bigquery
Expected behavior
Expect scale to be included. On PostgreSQL this is working so perhaps review how that does it.
Describe the bug
Custom query row validation on Db2 loses precision and scale. In
Backend._metadatawe do have precision and scale incursor.description:But not after
_get_typehas processed it:What version of DVT are you using?
8.5.1
What type of connections are you using for source and target?
Db2
Steps to reproduce the behavior
Add
col_dec_10_2to Db2 testtest_custom_query_row_concat_validation_core_types_to_bigqueryExpected behavior
Expect scale to be included. On PostgreSQL this is working so perhaps review how that does it.