[Bugfix](Jdbc Catalog) fix data type mapping of SQLServer Catalog (#19525)
We map `money/smallmoney` types of SQLSERVER into decimal type of doris.
This commit is contained in:
@ -379,7 +379,9 @@ The transaction mechanism ensures the atomicity of data writing to JDBC External
|
||||
| int | INT | |
|
||||
| bigint | BIGINT | |
|
||||
| real | FLOAT | |
|
||||
| float/money/smallmoney | DOUBLE | |
|
||||
| float | DOUBLE | |
|
||||
| money | DECIMAL(19,4) | |
|
||||
| smallmoney | DECIMAL(10,4) | |
|
||||
| decimal/numeric | DECIMAL | |
|
||||
| date | DATE | |
|
||||
| datetime/datetime2/smalldatetime | DATETIMEV2 | |
|
||||
|
||||
@ -378,7 +378,9 @@ set enable_odbc_transcation = true;
|
||||
| int | INT | |
|
||||
| bigint | BIGINT | |
|
||||
| real | FLOAT | |
|
||||
| float/money/smallmoney | DOUBLE | |
|
||||
| float | DOUBLE | |
|
||||
| money | DECIMAL(19,4) | |
|
||||
| smallmoney | DECIMAL(10,4) | |
|
||||
| decimal/numeric | DECIMAL | |
|
||||
| date | DATE | |
|
||||
| datetime/datetime2/smalldatetime | DATETIMEV2 | |
|
||||
|
||||
@ -798,9 +798,11 @@ public class JdbcClient {
|
||||
case "real":
|
||||
return Type.FLOAT;
|
||||
case "float":
|
||||
case "money":
|
||||
case "smallmoney":
|
||||
return Type.DOUBLE;
|
||||
case "money":
|
||||
return ScalarType.createDecimalV3Type(19, 4);
|
||||
case "smallmoney":
|
||||
return ScalarType.createDecimalV3Type(10, 4);
|
||||
case "decimal":
|
||||
case "numeric":
|
||||
int precision = fieldSchema.getColumnSize();
|
||||
|
||||
@ -30,9 +30,9 @@
|
||||
4 2023-01-17 16:49:05 2023-01-17T16:49:05 2023-01-17T16:49:05 2023-01-17T16:49 2023-01-17 16:49:05 +08:00
|
||||
|
||||
-- !test6 --
|
||||
1 9.223372036854776E14 214748.3647
|
||||
2 -9.223372036854776E14 -214748.3648
|
||||
3 123.123 123.123
|
||||
1 922337203685477.5807 214748.3647
|
||||
2 -922337203685477.5808 -214748.3648
|
||||
3 123.1230 123.1230
|
||||
|
||||
-- !test7 --
|
||||
1 12345678901234567890123456789012345678 12345678901234567890123456789012345678 1234567890123456789012345678.0123456789 1234567890123456789012345678.0123456789
|
||||
|
||||
Reference in New Issue
Block a user