Can't view system tables due to Unsupported ArrowType Utf8View

Open
#807 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
databases

Research direction

Start in SqlTypes.java at getSqlTypeIdFromArrowType(), as shown in the stack trace, and trace how ConvertUtils builds JDBC column metadata. Reproduce the query against the affected system table, then verify that Utf8View is handled without the SQLException and that column names can be retrieved.

Written by the indexing model from the issue text.

Description

Type: bug
Describe the bug, including details regarding any error messages, version, and platform.

I'm using the latest JDBC 18.3 and I can't open some tables and retrieve column names due to the exception:

java.sql.SQLException: Error while executing SQL "SELECT t.*
FROM "system"."distinct_caches" t": Unsupported ArrowType Utf8View
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.Helper.createException(Helper.java:56)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:218)
in RemoteStatementImpl.execute(RemoteStatementImpl.java:79)
Caused by: java.lang.IllegalArgumentException: Unsupported ArrowType Utf8View
at org.apache.arrow.driver.jdbc.utils.SqlTypes.getSqlTypeIdFromArrowType(SqlTypes.java:163)
at org.apache.arrow.driver.jdbc.utils.ConvertUtils.lambda$convertArrowFieldsToColumnMetaDataList$0(ConvertUtils.java:83)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:200)
at java.base/java.util.stream.Stream$1.tryAdvance(Stream.java:1469)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at org.apache.arrow.driver.jdbc.utils.ConvertUtils.convertArrowFieldsToColumnMetaDataList(ConvertUtils.java:89)
at org.apache.arrow.driver.jdbc.ArrowFlightMetaImpl.newSignature(ArrowFlightMetaImpl.java:60)
at org.apache.arrow.driver.jdbc.ArrowFlightMetaImpl.prepareForHandle(ArrowFlightMetaImpl.java:175)
at org.apache.arrow.driver.jdbc.ArrowFlightMetaImpl.prepareAndExecute(ArrowFlightMetaImpl.java:209)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:218)
in RemoteStatementImpl.execute(RemoteStatementImpl.java:79)
... 3 more
Dominant language
Java
Stars
95
Forks
154
Avg merge
2d 10h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-java

All issues in apache/arrow-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.