Skip to content

Add Support for Reading Tuple Type with the Cassandra Connector #25515

@BryanCutler

Description

@BryanCutler

The Tuple data type in Cassandra is currently unsupported. Trying to select a column of type Tuple leads to the following error:

java.lang.RuntimeException: cassandraType is null

	at com.facebook.presto.tests.AbstractTestingPrestoClient.execute(AbstractTestingPrestoClient.java:126)
	...
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)
Caused by: java.lang.NullPointerException: cassandraType is null
	at java.base/java.util.Objects.requireNonNull(Objects.java:233)
	at com.facebook.presto.cassandra.CassandraColumnHandle.<init>(CassandraColumnHandle.java:62)
	at com.facebook.presto.cassandra.NativeCassandraSession.buildColumnHandle(NativeCassandraSession.java:388)
	at com.facebook.presto.cassandra.NativeCassandraSession.getTable(NativeCassandraSession.java:259)

We should support selecting columns of Tuple type and improve the error message for unsupported types instead of vague null pointer exception.

Expected Behavior or Use Case

For Tuple types, support reading. Other unsupported types improve the error message.

Presto Component, Service, or Connector

Cassandra connector.

Possible Implementation

A straightforward solution would be to read the tuple value as a varchar. This is similar to other data types in Cassandra such as list/map.

Example Screenshots (if appropriate):

Context

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions