- avatar image
- asked Erick Ramirez commented

Connecting to DSE via presto-server-348 is throwing SchemaParser error, "UnresolvedUserTypeException: Cannot resolve user type system_distributed.duration"

error message in presto logs:

ERROR Query-20210727_112444_00031_y5ycf-441 com.datastax.driver.core.SchemaParser Error parsing schema from Cassandra system tables: the schema in Cluster#getMetadata() will appear incomplete or stale
com.datastax.driver.core.exceptions.UnresolvedUserTypeException: Cannot resolve user type system_distributed.duration
 at com.datastax.driver.core.DataTypeCqlNameParser.parse(
 at com.datastax.driver.core.SchemaParser.buildUserTypes(
 at com.datastax.driver.core.SchemaParser.buildKeyspaces(
 at com.datastax.driver.core.SchemaParser.refresh(
 at com.datastax.driver.core.ControlConnection.refreshSchema(
 at com.datastax.driver.core.ControlConnection.tryConnect(
 at com.datastax.driver.core.ControlConnection.reconnectInternal(
 at com.datastax.driver.core.ControlConnection.connect(
 at com.datastax.driver.core.Cluster$Manager.init(
 at com.datastax.driver.core.Cluster.init(
 at com.datastax.driver.core.Cluster.connectAsync(
 at com.datastax.driver.core.Cluster.connectAsync(
 at com.datastax.driver.core.Cluster.connect(
 at com.datastax.driver.core.DelegatingCluster.connect(
 at io.prestosql.plugin.cassandra.CassandraSession.executeWithSession(
 at io.prestosql.plugin.cassandra.CassandraSession.getCaseSensitiveSchemaNames(
 at io.prestosql.plugin.cassandra.CassandraMetadata.listSchemaNames(
 at io.prestosql.spi.connector.ConnectorMetadata.schemaExists(
 at io.prestosql.metadata.MetadataManager.lambda$schemaExists$0(
 at java.base/$1MatchSink.accept(
 at java.base/$3$1.accept(
 at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(
 at java.base/
 at java.base/
 at java.base/
 at java.base/
 at java.base/$MatchOp.evaluateSequential(
 at java.base/$MatchOp.evaluateSequential(
 at java.base/
 at java.base/
 at io.prestosql.metadata.MetadataManager.schemaExists(
 at io.prestosql.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowTables(
 at io.prestosql.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowTables(
 at io.prestosql.sql.tree.ShowTables.accept(
 at io.prestosql.sql.tree.AstVisitor.process(
 at io.prestosql.sql.rewrite.ShowQueriesRewrite.rewrite(
 at io.prestosql.sql.rewrite.StatementRewrite.rewrite(
 at io.prestosql.sql.analyzer.Analyzer.analyze(
 at io.prestosql.sql.analyzer.Analyzer.analyze(
 at io.prestosql.execution.SqlQueryExecution.analyze(
 at io.prestosql.execution.SqlQueryExecution.<init>(
 at io.prestosql.execution.SqlQueryExecution$SqlQueryExecutionFactory.createQueryExecution(
 at io.prestosql.dispatcher.LocalDispatchQueryFactory.lambda$createDispatchQuery$0(
 at io.prestosql.$ Source)
 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
 at java.base/java.util.concurrent.ThreadPoolExecutor$
 at java.base/

No error in cassandra logs

Error while checking presto-dse (cassandra) through python even though hunt_demo db exists in dse cassandra:

prestodb.exceptions.PrestoUserError: PrestoUserError(type=USER_ERROR, name=SCHEMA_NOT_FOUND, message="line 1:1: Schema 'hunt_demo' does not exist", query_id=20210802_114749_14361_y5ycf)

However, direct connection to dse (cassandra) is working fine and this same presto is able to connect to apache cassandra.

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

CASSANDRA-11873 added duration type in Cassandra 3.10 and support was added to the Java driver in version 3.2 (JAVA-1347).

Java driver 3.2 was released all the way back in March 2017 so it appears that your installation is still using a very old version of the driver.

Note that the error is only reported in the driver logs so you will not see it reported in the Cassandra logs.

You will need to upgrade to a newer version of the driver to resolve the issue. Cheers!

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I checked jars in presto, It is using prestosql cassandra jar and I'm using it's latest version from I couldn't find java driver anywhere in presto directory.

0 Likes 0 ·

As you've stated, Presto is using Java driver 3.1.4 which is from February 2017. You'll need to contact Presto support and get them to upgrade to a newer version of the Cassandra Java driver. Cheers!

0 Likes 0 ·