Presto Connector can't extract Array : org.jkiss.dbeaver.model.exec.DBCException: Can't extract array data from JDBC array
See original GitHub issueSystem information:
- Operating system (distribution) and version macOS high sierra
- DBeaver version 6.0.5.201905192012
- Java version 1.8.0_162
- Additional extensions
Connection specification:
- Database name and version presto 0.219
- Driver name PrestoDB
- Do you use tunnels or proxies (SSH, SOCKS, etc)? no
Describe the problem you’re observing:
SQL:
select split('apache presto','e') as string_split;
ERROR:
org.jkiss.dbeaver.model.exec.DBCException: Can't extract array data from JDBC array
at org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCollection.makeCollectionFromArray(JDBCCollection.java:240)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCArrayValueHandler.getValueFromObject(JDBCArrayValueHandler.java:62)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCArrayValueHandler.getValueFromObject(JDBCArrayValueHandler.java:1)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCComplexValueHandler.fetchColumnValue(JDBCComplexValueHandler.java:50)
at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCAbstractValueHandler.fetchValueObject(JDBCAbstractValueHandler.java:49)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetDataReceiver.fetchRow(ResultSetDataReceiver.java:122)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.fetchQueryData(SQLQueryJob.java:755)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:484)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:407)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:146)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:405)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:849)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2727)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:98)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:146)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:96)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.jkiss.dbeaver.model.exec.DBCException: SQL error: getResultSet not supported
at org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCollection.makeCollectionFromArray(JDBCCollection.java:224)
... 17 more
Caused by: java.sql.SQLFeatureNotSupportedException: getResultSet not supported
at com.facebook.presto.jdbc.PrestoArray.getResultSet(PrestoArray.java:89)
at org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCollection.makeCollectionFromResultSet(JDBCCollection.java:313)
at org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCollection.makeCollectionFromArray(JDBCCollection.java:222)
... 17 more
Steps to reproduce, if exist:
Include any warning/errors/backtraces from the logs
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Error when trying to use custom built JDBC driver
I am trying to use DBeaver with a custom build JDBC driver for a new BI database. ... at org.jkiss.dbeaver.model.impl.jdbc.exec.
Read more >org.jkiss.dbeaver.model.exec.DBCException - page 10
the class JDBCCollection method getArrayValue. public Array getArrayValue() throws DBCException { Object[] attrs = new ...
Read more >Connect to Presto Data in DBeaver - CData Software
This article shows how to connect to Presto data with wizards in DBeaver and browse data in the DBeaver GUI. Create a JDBC...
Read more >DBeaver 22.2.2 - Fresh FOSS
DBeaver is a free multi-platform database tool for developers, SQL programmers, database administrators and analysts. Supports all popular databases: MySQL, ...
Read more >dbeaver连接presto查询hive表时报错 - 简书
错误详情org.jkiss.dbeaver.model.exec.DBCException: Can't extract array data from JDBC arra...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@emhlbmc @elonlo @kdonavin thanks for details. I’ve reproduced this problem on AWS EMR Presto. The actul problem was in wrong JDBC array data type (it was in form “VARCHAR(13)” while it must be simply “VARCHAR”.
Anyway, I’ve added a workaround and now arrays are parsed correctly. Please check it, maybe it’ll fail some more complicated cases. Early Access version: https://dbeaver.io/files/ea
verified