8823Senior opened a new issue #11132:
URL: https://github.com/apache/druid/issues/11132
encounter exception when query by Avatica
AvaticaSqlException: Error -1 (00000) : while preparing SQL
### 0.20
The Druid version where the problem was encountered.
### Description
when my springboot service query data of druid by Avatica-core , could got
exception occasional
this exception does't appear everytime. it's occasional.
although i got the exception now , it is normal that query again after a few
seconds.
but, the query params is same. could anyone know why it is ?
```xml
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
<artifactId>avatica-core</artifactId>
<version>1.17.0</version>
</dependency>
```
### this is spring log
although i got the exception now , it is normal that query again after a few
seconds.
by spring log, it seems that spring guess that the SQL Preparestatement
appear exception, but , it is not exact.
because, when i query again with same sql after a few seconds, it's normal
and not have exception.
```properties
org.springframework.jdbc.UncategorizedSQLException:
### Error querying database. Cause:
org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : while
preparing SQL: SELECT
productLine,
SUM(gpuQuantityNew) AS gpuQuantityNew
FROM instance_stat4
WHERE dataType = ?
GROUP BY 1
### The error may exist in URL
[jar:file:/app.jar!/BOOT-INF/classes!/mapper/stat/InstanceStatMapper.xml]
### The error may involve
com.data.mapper.stat.InstanceStatMapper.selectSumGroupByProductLine
### The error occurred while executing a query
### SQL: SELECT productLine, SUM(gpuQuantityNew)
AS gpuQuantityNew FROM instance_stat4 WHERE
dataType = ? GROUP BY 1
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]