cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Reddy (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-12606) CQLSSTableWriter unable to use blob conversion functions
Date Fri, 02 Sep 2016 22:57:21 GMT
Mark Reddy created CASSANDRA-12606:

             Summary: CQLSSTableWriter unable to use blob conversion functions
                 Key: CASSANDRA-12606
             Project: Cassandra
          Issue Type: Bug
          Components: CQL, Tools
            Reporter: Mark Reddy
            Priority: Minor

Attempting to use blob conversion functions e.g. textAsBlob, from 3.0 - 3.7 results in:

Exception in thread "main" org.apache.cassandra.exceptions.InvalidRequestException: Unknown
function textasblob called
	at org.apache.cassandra.cql3.functions.FunctionCall$Raw.prepare(
	at org.apache.cassandra.cql3.Operation$SetValue.prepare(
	at org.apache.cassandra.cql3.statements.UpdateStatement$ParsedInsert.prepareInternal(
	at org.apache.cassandra.cql3.statements.ModificationStatement$Parsed.prepare(
	at org.apache.cassandra.cql3.statements.ModificationStatement$Parsed.prepare(

The following snippet will reproduce the issue
String table = String.format("%s.%s", "test_ks", "test_table");
String schema = String.format("CREATE TABLE %s (test_text text, test_blob blob, PRIMARY KEY(test_text));",
String insertStatement = String.format("INSERT INTO %s (test_text, test_blob) VALUES (?, textAsBlob(?))",

File tempDir = Files.createTempDirectory("tempDir").toFile();

CQLSSTableWriter sstableWriter = CQLSSTableWriter.builder()

This is caused in FunctionResolver.get(...) when candidates.addAll(Schema.instance.getFunctions(name.asNativeFunction()));
is called, as there is no system keyspace initialised.

This message was sent by Atlassian JIRA

View raw message