You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "itsallsame (via GitHub)" <gi...@apache.org> on 2023/07/10 08:49:16 UTC
[GitHub] [doris] itsallsame opened a new issue, #21684: [Bug] "using mutil catalog, connect to ClickHouse, unable to use Date type as filter condition, error message: Cannot convert string to type Date."
itsallsame opened a new issue, #21684:
URL: https://github.com/apache/doris/issues/21684
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
1.2.5
### What's Wrong?
"When configuring the connection to ClickHouse in multi-catalog mode, queries without Date types in the WHERE clause can be executed successfully. However, if the WHERE clause contains Date types, an error will occur, such as: 'Cannot convert string 2023-07-03 00:00:00 to type Date'."
PS1:
my sql:
```
select * from catalog_clickhouse.test.test_member where d = '2023-07-03' limit 100;
select * from catalog_clickhouse.test.test_member where d=date_sub(current_date(), 1) limit 100;
```
error:

PS2:
clickhouse version: 21.3.6.55
catalog jdbc version: clickhouse-jdbc-0.3.2-patch11-all.jar
create table sql:
```
distribute table sql
CREATE TABLE test.test_member
(
`d` Date COMMENT '日期',
`id` UInt32 COMMENT 'id',
`gender` String COMMENT '性别(男,女,不明)',
......
`params` String COMMENT '自定义拓展字段'
)
ENGINE = Distributed('ch_cluster1', 'test_shard', 'test_member', sipHash64(id));
shard table sql:
CREATE TABLE test_shard.test_member
(
`d` Date COMMENT '日期',
`id` UInt32 COMMENT 'id',
`gender` String COMMENT '性别(男,女,不明)',
......
`params` String COMMENT '自定义拓展字段'
)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test_shard/test_member/{layer}', '{replica}')
PARTITION BY d
ORDER BY id
SETTINGS index_granularity = 8192
```
PS3:
doris sql explain:
```
PLAN FRAGMENT 0
OUTPUT EXPRS:
`d`
`id`
PARTITION: UNPARTITIONED
""
VRESULT SINK
""
0:VJdbcScanNode
" TABLE: ""test"".""test_member"""
" QUERY: SELECT ""d"", ""id"" FROM ""test"".""test_member"" WHERE (""d"" = '2023-07-03 00:00:00') LIMIT 100"
limit: 100
```
### What You Expected?
get data from clickhouse
### How to Reproduce?
_No response_
### Anything Else?
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zy-kkk closed issue #21684: [Bug] "using mutil catalog, connect to ClickHouse, unable to use Date type as filter condition, error message: Cannot convert string to type Date."
Posted by "zy-kkk (via GitHub)" <gi...@apache.org>.
zy-kkk closed issue #21684: [Bug] "using mutil catalog, connect to ClickHouse, unable to use Date type as filter condition, error message: Cannot convert string to type Date."
URL: https://github.com/apache/doris/issues/21684
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zy-kkk commented on issue #21684: [Bug] "using mutil catalog, connect to ClickHouse, unable to use Date type as filter condition, error message: Cannot convert string to type Date."
Posted by "zy-kkk (via GitHub)" <gi...@apache.org>.
zy-kkk commented on issue #21684:
URL: https://github.com/apache/doris/issues/21684#issuecomment-1629255798
I did not reproduce your situation, can you add my wechat for detailed chat :zyk815574403
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] itsallsame commented on issue #21684: [Bug] "using mutil catalog, connect to ClickHouse, unable to use Date type as filter condition, error message: Cannot convert string to type Date."
Posted by "itsallsame (via GitHub)" <gi...@apache.org>.
itsallsame commented on issue #21684:
URL: https://github.com/apache/doris/issues/21684#issuecomment-1630031976
> zyk815574403
OK
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org