create and insert data by SQL:
CREATE TABLE test_decimal_X
(
id String,
test_decimal Decimal(18,10)
)
ENGINE = MergeTree
ORDER BY id
INSERT INTO test_decimal_X VALUES('2',10.12)
set up ODBC connection
After setting up odbc connection, we use SQLDescribeColW() (written in c++ ) to get precision and scale of decimal, but get result: type=decimal,precision=41,scale=0, 4.
The sql I execute is: SELECT T0.id AS id,T0.test_decimal AS test_decimal FROM test_decimal_X T0. The error I get is : HY000[1] Cannot interpret ‘10.12’ as signed 64-bit integer: Cannot string consumed partially.
Expectation:
Expect to get correct precision and scale of decimal through SQLDescribeColW() .
Environment: Clickhouse ODBC driver version: latest one downloaded from https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.2.1.20220905/clickhouse-odbc-windows.zip Windows 10
Steps:
id
String,test_decimal
Decimal(18,10) ) ENGINE = MergeTree ORDER BY idINSERT INTO test_decimal_X VALUES('2',10.12)
set up ODBC connection
After setting up odbc connection, we use SQLDescribeColW() (written in c++ ) to get precision and scale of decimal, but get result: type=decimal,precision=41,scale=0, 4.
The sql I execute is: SELECT T0.
id
ASid
,T0.test_decimal
AStest_decimal
FROMtest_decimal_X
T0. The error I get is : HY000[1] Cannot interpret ‘10.12’ as signed 64-bit integer: Cannot string consumed partially.Expectation: Expect to get correct precision and scale of decimal through SQLDescribeColW() .