cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-2474) CQL support for compound columns
Date Sun, 04 Sep 2011 09:56:10 GMT


Pavel Yaskevich commented on CASSANDRA-2474:

bq. Remember that the ideal for CQL is to have "SELECT x, y, z" and get back exactly columns
x, y, and z.

composite/super columns won't originally play nice with SQL syntax because it wasn't designed
to query hierarchical data.

Few problems I have with componentX syntax:

 - if we have 10 subcolumns do I need to list them all using component syntax (which would
be totally unreadable)?
 - it lacks scoping therefore on the big queries it will be hard to read
      SELECT component1 AS tweet_id, component2 AS username, body, location, age, value AS
 - will potentially be hard to put into grammar because it can have ambiguous rules again
because lack of scoping
 - why should we force users to actually give each component a number? 

And I don't get why do you think that (..,..,..) is a "rocket science" syntax:

If we presume that user should be familiar with composite type columns before start using
the syntax then he will know what does each section (separated by ",") mean:

SELECT name AS (tweet_id, username, location), value AS body

means that we have three sections as column name which we are aliasing to tweet_id, username,

SELECT name AS (tweet_id, username | body | location | age), value AS body

means that we have two components in the name: first one - tweet_id, and second component
that has multiple meanings but we only want to get username, body, location

SELECT name AS (tweet_id, *), value AS body

means that we still have two components in the column name but we don't care what holds component
#2 and we expect result set to return all of the possible values.

> CQL support for compound columns
> --------------------------------
>                 Key: CASSANDRA-2474
>                 URL:
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Eric Evans
>            Assignee: Pavel Yaskevich
>              Labels: cql
>             Fix For: 1.0
>         Attachments: screenshot-1.jpg, screenshot-2.jpg
> For the most part, this boils down to supporting the specification of compound column
names (the CQL syntax is colon-delimted terms), and then teaching the decoders (drivers) to
create structures from the results.

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


View raw message