DB::Exception: Bad get: has UInt64, requested String

呵呵,真的太坑了,使用clickhouse在建分布式表的时候报错了:

node03 :) CREATE TABLE ontime_all AS ontime_local_2 ENGINE = Distributed(cluster-1, h2, ontime_local_2, '100');

CREATE TABLE ontime_all AS ontime_local_2
ENGINE = Distributed(cluster - 1, h2, ontime_local_2, '100')

Received exception from server (version 19.9.5):
Code: 170. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Bad get: has UInt64, requested String. 

0 rows in set. Elapsed: 0.001 sec. 

查看日志文件:

2019.08.14 02:30:20.310653 [ 45 ] {eba0bb00-5629-4833-afab-92d7023d01c7} <Error> executeQuery: Code: 170, e.displayText() = DB::Exception: Bad get: has UInt64, requested String (version 19.9.5.36) (from [::1]:50202) (in query: CREATE TABLE ontime_all AS ontime_local_2 ENGINE = Distributed(cluster-1, h2, ontime_local_2, '100');), Stack trace:

0. clickhouse-server(StackTrace::StackTrace()+0x16) [0x65cbc16]
1. clickhouse-server(DB::Exception::Exception(std::string const&, int)+0x1f) [0x2ffea8f]
2. clickhouse-server(DB::getClusterName(DB::IAST const&)+0x354) [0x6218b44]
3. clickhouse-server(DB::getClusterName(DB::IAST const&)+0x170) [0x6218960]
4. clickhouse-server() [0x5d7e51a]
5. clickhouse-server(DB::StorageFactory::get(DB::ASTCreateQuery&, std::string const&, std::string const&, std::string const&, DB::Context&, DB::Context&, DB::ColumnsDescription const&, bool, bool) const+0x1df) [0x5d821bf]
6. clickhouse-server(DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&)+0x6d7) [0x5ba2a87]
7. clickhouse-server(DB::InterpreterCreateQuery::execute()+0x56) [0x5ba5046]
8. clickhouse-server() [0x5cb8ef2]
9. clickhouse-server(DB::executeQuery(std::string const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool)+0x7d) [0x5cbafed]
10. clickhouse-server(DB::TCPHandler::runImpl()+0x4a3) [0x3009833]

反正我是被坑了,我试着加上引号,因为我实在是没招了,之前看人家都说没加引号,我日

node03 :) CREATE TABLE ontime_all AS ontime_local_2 ENGINE = Distributed('cluster-1', 'h2', 'ontime_local_2', 100);

CREATE TABLE ontime_all AS ontime_local_2
ENGINE = Distributed('cluster-1', 'h2', 'ontime_local_2', 100)

Ok.

0 rows in set. Elapsed: 0.005 sec. 

node03 :) show tables

SHOW TABLES

┌─name───────────┐
│ ontime_all     │
│ ontime_local_2 │
└────────────────┘

  是他们写错误导我了,还是我的版本的问题,我真的很无语,我一直以为自己系统坏了,整了了快一天。。。。我还在GitHub提问了,结果我试出来了。。。

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值