We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decimal(10,2),Decimal(10,5) 部分数值会丢失经度 示例代码如下:
<?php require __DIR__ . '/api/vendor/autoload.php'; $t1 = microtime(true); $ck = new \OneCk\Client('tcp://127.0.0.1:19000', 'clickhouse', 'passwod', 'default'); $data['server info'] = $ck->getServerInfo(); $data['drop table'] = $ck->query('DROP TABLE IF EXISTS t6'); $res = $ck->query("SELECT sipHash64(toString('1ace54')) AS result"); if($res[0]['result'] !== '9525649478782099197'){ throw new \Exception('test uint64 fail:' . __LINE__); } $table = [ 'CREATE TABLE t6 (', '`id` UInt32,', '`f1` Decimal(10,2),', '`f2` Decimal64(5),', '`f3` Decimal128(7),', ') ENGINE = MergeTree() ORDER BY id SETTINGS index_granularity = 8192' ]; $data['create table'] = $ck->query(implode("\n", $table)); $data['insert data'] = $ck->insert('t6', [ [ 'id' => 1, 'f1' => 16.90, 'f2' => 36.48, // 'f1' => 8.20, 'f3' => '170141183460469231168730371588.4105721', ], ]); $data = $ck->query('select * from t6'); echo json_encode($data);
[{"id":1,"f1":16.89,"f2":36.47999,"f3":"170141183460469231168730371588.4105721"}]
The text was updated successfully, but these errors were encountered:
#20 已经修复了,可以测试看看,合并进来
Sorry, something went wrong.
9f6c0d8
Merge pull request #20 from justmd5/master
c7d9dc2
fix #19 Decimal相关类型偶发丢失精度问题修复
No branches or pull requests
Decimal(10,2),Decimal(10,5) 部分数值会丢失经度
示例代码如下:
结果
The text was updated successfully, but these errors were encountered: