cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Evans (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-2124) JDBC driver for CQL
Date Tue, 15 Feb 2011 17:55:57 GMT


Eric Evans commented on CASSANDRA-2124:

bq. 1. BytesType (to be decoded as String ?)

These should be returned as-is (as ByteBuffers).

1.a. AsciiType (to be decoded as String ?)
1.b. UTF8Type (to be decoded as String ?) 

As strings, yes.  Values of type UTF8Type should be decoded using the utf8 charset.

bq. 2. IntegerType (to be decoded as Integer?)


3. LexicalUUIDType (to be decoded as String ?)
5. TimeUUIDType (to be decoded as Date ?)


bq. 4. LongType (to be decoded as Long ?) 


bq. 6. LocalByPartionerType (Not sure)

You can disregard this one.

While executing a cql query, we need to know it's column family name. So that we can ask DefaultDecoder
to return all column names with correct decoding(mentioned above). Ways to retrieve this is
1) Use CqlParser to get Statement and retrieve it from StatementType.(Same way as it is done
in QueryProcessor).

This is pretty heavy-weight because it not only means including all of {{o.a.c.cql}} in the
drivers jar, but requiring its dependencies as well (antlr at least).

bq. 2. Writing a logic to retrieve ColumnFamily name via substring of cql query does not make
any sense.

I don't think it's too bad.  You're talking about a couple of very trivial, pre-compiled regexes
(one for {{USE}} to track the current keyspace, and one for {{SELECT}} to get the columnfamily).
 For what it's worth, drivers written in other languages are faced with solving the same problem,
and utilizing the node-side parser is not an option for them.

bq. 3. Is there a way to get ColumnFamily Name from CqlResult/CqlRow itself?.

This strikes as me as wasteful since the results will always correlate to a single column
family, (and we shouldn't need the node to tell us).

> JDBC driver for CQL
> -------------------
>                 Key: CASSANDRA-2124
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API
>            Reporter: Eric Evans
>            Assignee: Vivek Mishra
>            Priority: Minor
>              Labels: cql
>         Attachments: Cassandra-2124_v1.0, cassandra-0.7.1-2124_v2.0, cassandra-0.7.1-2124_v2.1
> A simple connection class and corresponding pool was created for CQL as a part of CASSANDRA-1710,
but a JDBC driver (either in addition to, or as a replacement for) would also be interesting.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message