[ https://issues.apache.org/jira/browse/CASSANDRA-8877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14345474#comment-14345474 ]
Drew Kutcharian edited comment on CASSANDRA-8877 at 3/3/15 6:46 PM: -------------------------------------------------------------------- [~slebresne] you are correct that this is relates to CASSANDRA-7396. The ideal situation would be: 1. Be able to select the value of the an element in a collection individually, i.e. {code} SELECT fields['first_name'] from user {code} 2. Be able to select the value, TTL and writetime of the an element in a collection individually {code} SELECT TTL(fields['first_name']), WRITETIME(fields['first_name']) from user {code} 3. Be able to select the values of ALL the elements in a collection (this is the current functionality when selecting a collection column) {code} SELECT fields from user {code} Optionally: 4. Be able to select the value, TTL and writetime of ALL the elements in a collection. This is where I haven't come up with a good syntax but maybe something like this: {code} SELECT fields, METADATA(fields) from user {code} and the response would be {code} fields => { 'first_name': 'john', 'last_name': 'doe' } METADATA(fields) => { 'first_name': {'ttl': <ttl seconds>, 'writetime': <timestamp> }, 'last_name': {'ttl': <ttl seconds>, 'writetime': <timestamp> } } {code} or alternatively (without adding a new function): {code} SELECT fields, TTL(fields), WRITETIME(fields) from user {code} and the response would be {code} fields => { 'first_name': 'john', 'last_name': 'doe' } TTL(fields) => { 'first_name': <ttl seconds>, 'last_name': <ttl seconds> } WRITETIME(fields) => { 'first_name': <writetime millis>, 'last_name': <writetime millis> } {code} was (Author: drew_kutchar): [~slebresne] you are correct that this is relates to CASSANDRA-7396. The ideal situation would be: 1. Be able to select the value of the an element in a collection individually, i.e. {code} SELECT fields['name'] from user {code} 2. Be able to select the value, TTL and writetime of the an element in a collection individually {code} SELECT TTL(fields['name']), WRITETIME(fields['name']) from user {code} 3. Be able to select the values of ALL the elements in a collection (this is the current functionality when selecting a collection column) {code} SELECT fields from user {code} Optionally: 4. Be able to select the value, TTL and writetime of ALL the elements in a collection. This is where I haven't come up with a good syntax but maybe something like this: {code} SELECT fields, METADATA(fields) from user {code} and the response would be {code} fields: { 'name': 'john' } METADATA(fields): { 'name': {'ttl': <ttl seconds>, 'writetime': <timestamp> } } {code} or alternatively (without adding a new function): {code} SELECT fields, TTL(fields), WRITETIME(fields) from user {code} and the response would be {code} fields: { 'name': 'john' } TTL(fields): { 'name': <ttl seconds> } WRITETIME(fields): { 'name': <writetime millis> } {code} > Ability to read the TTL and WRTIE TIME of an element in a collection > -------------------------------------------------------------------- > > Key: CASSANDRA-8877 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8877 > Project: Cassandra > Issue Type: Improvement > Reporter: Drew Kutcharian > Assignee: Benjamin Lerer > Priority: Minor > Fix For: 3.0 > > > Currently it's possible to set the TTL and WRITE TIME of an element in a > collection using CQL, but there is no way to read them back. -- This message was sent by Atlassian JIRA (v6.3.4#6332)