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/04/01 09:37:00 UTC
[jira] [Updated] (CALCITE-5080) jdbc adapter "zeroDateTimeBehavior=convertToNull" Causes "enumerable" to get stuck
[ https://issues.apache.org/jira/browse/CALCITE-5080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
itxiangkui updated CALCITE-5080:
--------------------------------
Description:
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;
```
{
"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"
}
}]
}
*will be ok*
{
"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"
}
}]
}
*will cause stuck*
> jdbc adapter "zeroDateTimeBehavior=convertToNull" Causes "enumerable" to get stuck
> ----------------------------------------------------------------------------------
>
> Key: CALCITE-5080
> URL: https://issues.apache.org/jira/browse/CALCITE-5080
> Project: Calcite
> Issue Type: Improvement
> Reporter: itxiangkui
> Priority: Major
>
> 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;
> ```
> {
> "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"
> }
> }]
> }
> *will be ok*
> {
> "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"
> }
> }]
> }
> *will cause stuck*
--
This message was sent by Atlassian Jira
(v8.20.1#820001)