[ https://issues.apache.org/jira/browse/CALCITE-5080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
itxiangkui updated CALCITE-5080: -------------------------------- Component/s: core jdbc-adapter jdbc-driver > 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: Bug > Components: core, jdbc-adapter, jdbc-driver > 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=round ", > "jdbcUser": "mysql", > "jdbcPassword": "mysql" > } > }] > } > *zeroDateTimeBehavior=round 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=convertToNull", > "jdbcUser": "mysql", > "jdbcPassword": "mysql" > } > }] > } > *zeroDateTimeBehavior=convertToNull will cause stuck* -- This message was sent by Atlassian Jira (v8.20.1#820001)