You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "itxiangkui (Jira)" <ji...@apache.org> on 2022/06/29 03:29:00 UTC
[jira] [Updated] (CALCITE-5080) jdbc adapter "zeroDateTimeBehavior=convertToNull" Causes "enumerable" to get stuck
| ![](cid:jira-generated-image-avatar-8940969f-bd5a-4d96-a6aa-a134fa97a518) |
[itxiangkui](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=itxiangkui)
**updated** an issue
---|---
|
---
| [Calcite](https://issues.apache.org/jira/browse/CALCITE) /
[![Bug](cid:jira-generated-image-avatar-
bb2f2bb1-0ba5-4ac6-9086-24dbd9b0fcf4)](https://issues.apache.org/jira/browse/CALCITE-5080)
[CALCITE-5080](https://issues.apache.org/jira/browse/CALCITE-5080)
---
[jdbc adapter "zeroDateTimeBehavior=convertToNull" Causes "enumerable" to get
stuck](https://issues.apache.org/jira/browse/CALCITE-5080)
| Change By: |
[itxiangkui](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=itxiangkui)
---|---
| We have a data set stored in Tidb (a distributed mysql database), a field
in the database is Timestamp type, there will be data items such as 0000-00-00
00:00:00
If the jdbc connection parameter does not add the zeroDateTimeBehavior=xx
command, the query will report an error, but the
zeroDateTimeBehavior=convertToNull command seems to cause the “Enumerable
bind” process to freeze and the query does not respond.
SQL:
select * from `catalog_name`.`database_name`.`table_name` limit 1;
*zeroDateTimeBehavior=round will be ok*
{code:java}
{
"version": "1.0",
"defaultSchema": "icuser",
"schemas": [
{
"name": "tidb_test",
"type": "custom",
"factory": "com.xxxx.TidbCatalogSchema$Factory",
"operand":
{
"jdbcDriver": "com.mysql.cj.jdbc.Driver",
"jdbcUrl": "jdbc:mysql://xxxxxx:4037/xx? zeroDateTimeBehavior=round ",
"jdbcUser": "mysql",
"jdbcPassword": "mysql"
}
}
]
} {code}
*zeroDateTimeBehavior= round convertToNull will be ok cause stuck *
{ code:java}
{
"version": "1.0",
"defaultSchema": "icuser",
"schemas": [{
"name": "tidb_test",
"type": "custom",
"factory": "com.xxxx.TidbCatalogSchema$Factory",
"operand":
{
"jdbcDriver": "com.mysql.cj.jdbc.Driver",
"jdbcUrl": "jdbc:mysql://xxxxxx:4037/xx? zeroDateTimeBehavior=convertToNull",
"jdbcUser": "mysql",
"jdbcPassword": "mysql"
}
} ]
} {code}
*zeroDateTimeBehavior=convertToNull will cause stuck*
---
| | [ ![Add Comment](cid:jira-generated-image-static-comment-
icon-264df895-2983-40ee-9578-5ea27086c0ef)
](https://issues.apache.org/jira/browse/CALCITE-5080#add-comment "Add
Comment") | [Add
Comment](https://issues.apache.org/jira/browse/CALCITE-5080#add-comment "Add
Comment")
---|---
| This message was sent by Atlassian Jira (v8.20.10#820010-sha1:ace47f9) | |
![Atlassian logo](https://issues.apache.org/jira/images/mail/atlassian-email-
logo.png)
---