[ 
https://issues.apache.org/jira/browse/IMPALA-13256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869031#comment-17869031
 ] 

Wenzhe Zhou commented on IMPALA-13256:
--------------------------------------

Thanks Yifan to report this jdbc table issue. I could not re-produce this issue 
in my local environment.
Could you provide more detail steps to re-produce this issue? Including the SQL 
statements to create jdbc table in Impala cluster and the SQL statement to 
create table in MySQL server, the query to access the jdbc table in Impala 
cluster, the query plan, and MySQL jdbc driver version. 
What's the output of query from Impala: select count(*) from jdbc_test_table, 
and output of query from MySQL client: select count(*) from test_table ? 
I also could not re-produce this issue with Postgres server.

> SQLDataException in external JDBC table query request
> -----------------------------------------------------
>
>                 Key: IMPALA-13256
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13256
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: YifanZhang
>            Priority: Major
>
> Logs from impala coordinator node:
> {code}
> I0726 21:15:51.142773 3202116 GenericJdbcDatabaseAccessor.java:86] 
> b34bb1ec996a2df9:a00f489200000000] Query to execute is [SELECT COUNT(*) FROM 
> (SELECT * FROM test_table) tmptable]
> E0726 21:15:51.287364 3202116 GenericJdbcDatabaseAccessor.java:101] 
> b34bb1ec996a2df9:a00f489200000000] Caught exception while trying to get the 
> number of records
> Java exception follows:
> java.sql.SQLDataException: Value '3379400792' is outside of valid range for 
> type java.lang.Integer
>       at 
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:114)
>       at 
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
>       at 
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
>       at 
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
>       at 
> com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
>       at 
> com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:92)
>       at 
> com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1431)
>       at com.mysql.cj.jdbc.result.ResultSetImpl.getInt(ResultSetImpl.java:830)
>       at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
>       at 
> org.apache.commons.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:623)
>       at 
> org.apache.impala.extdatasource.jdbc.dao.GenericJdbcDatabaseAccessor.getTotalNumberOfRecords(GenericJdbcDatabaseAccessor.java:92)
>       at 
> org.apache.impala.extdatasource.jdbc.JdbcDataSource.buildQueryAndExecute(JdbcDataSource.java:335)
>       at 
> org.apache.impala.extdatasource.jdbc.JdbcDataSource.open(JdbcDataSource.java:157)
>       at 
> org.apache.impala.extdatasource.ExternalDataSourceExecutor.open(ExternalDataSourceExecutor.java:274)
>       at 
> org.apache.impala.extdatasource.ExternalDataSourceExecutor.open(ExternalDataSourceExecutor.java:217)
> Caused by: com.mysql.cj.exceptions.NumberOutOfRange: Value '3379400792' is 
> outside of valid range for type java.lang.Integer
>       at 
> com.mysql.cj.result.IntegerValueFactory.createFromLong(IntegerValueFactory.java:62)
>       at 
> com.mysql.cj.result.IntegerValueFactory.createFromLong(IntegerValueFactory.java:44)
>       at 
> com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeInt8(MysqlTextValueDecoder.java:126)
>       at 
> com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:113)
>       at 
> com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:243)
>       at 
> com.mysql.cj.protocol.a.result.ByteArrayRow.getValue(ByteArrayRow.java:91)
>       at 
> com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1324)
>       ... 8 more {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to