[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2017-05-23 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Since Version: 4.x
   Status: Awaiting Feedback  (was: Open)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Sylvain Lebresne
>  Labels: cql, docs-impacting
> Fix For: 4.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2017-05-23 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Status: Patch Available  (was: Awaiting Feedback)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Sylvain Lebresne
>  Labels: cql, docs-impacting
> Fix For: 4.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2017-05-23 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Status: Open  (was: Ready to Commit)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Sylvain Lebresne
>  Labels: cql, docs-impacting
> Fix For: 4.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2017-05-23 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Status: Ready to Commit  (was: Patch Available)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Sylvain Lebresne
>  Labels: cql, docs-impacting
> Fix For: 4.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-06-17 Thread Sam Tunnicliffe (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Tunnicliffe updated CASSANDRA-7396:
---
Status: In Progress  (was: Ready to Commit)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-06-17 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Status: Ready to Commit  (was: Patch Available)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-05-22 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7396:

Status: Patch Available  (was: Open)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-05-22 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Status: Ready to Commit  (was: Patch Available)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-05-22 Thread Anonymous (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anonymous updated CASSANDRA-7396:
-
Status: Open  (was: Ready to Commit)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-05-10 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-7396:

Reviewer: Sylvain Lebresne  (was: Tyler Hobbs)

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-05-03 Thread Joshua McKenzie (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joshua McKenzie updated CASSANDRA-7396:
---
Reviewer: Tyler Hobbs

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-04-10 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7396:

Labels: cql docs-impacting  (was: cql)
Status: Patch Available  (was: Open)

[Branch|https://github.com/apache/cassandra/compare/trunk...snazy:7396-coll-slice]
[utests|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-7396-coll-slice-testall/lastSuccessfulBuild/]
[dtests|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-7396-coll-slice-dtest/lastSuccessfulBuild/]

{{serializeForNativeProtocol}} is now back in {{CollectionType}} 
implementations.

Unlike described in my earlier comment, the return type of single element 
selections is just the set/list element resp. map value type.

The updated patch also contains select/slice support for LWTs and deletions.

Unfortunately it requires a read-before-write for slice deletions for sets and 
maps - I could not find a functionality to add a “slice tombstone” and 
RangeTombstone does only seem to support deletion of a range of (CQL) rows but 
not for a range of a single column’s CellPaths.


> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql, docs-impacting
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-04-09 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7396:

Status: Open  (was: Patch Available)

Cancelling patch for the moment after CASSANDRA-7423 has been committed.

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2016-04-08 Thread Robert Stupp (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Stupp updated CASSANDRA-7396:

Status: Patch Available  (was: In Progress)

[Branch|https://github.com/apache/cassandra/compare/trunk...snazy:7396-coll-slice]
[utests|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-7396-coll-slice-testall/lastSuccessfulBuild/]
[dtests|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-7396-coll-slice-dtest/lastSuccessfulBuild/]

It allows single element and slice selections on sets, maps and lists - both 
frozen and non-frozen ones.

Syntax for single element selections is {{collection_column\[element_term\]}}.
Syntax for slice selections is {{collection_column\[from_term..to_term\]}}. 
Either {{from_term}} or {{to_term}} can be omitted to make either one unbounded.
All kinds of terms are allowed - including bind markers and function calls. 
Single element and slice selections can also be passed to functions/aggregates.
The resulting type of any element or slice selection is the same as the 
collection type. For example, {{set_column\[element\]}} will return a set (not 
a boolean).

Non-frozen collections (complex data) except lists are treated special. It uses 
{{ColumnFilter}} to filter only those values, that are within the bounds of the 
slice(s).

{{CollectionSerializer.serializeForNativeProtocol}} (moved from 
{{CollectionType}}) now takes additional parameters to prevent superfluous 
serialization - this works for non-frozen lists, too.
{{CollectionSerializer.reserializeForNativeProtocol}} performs similar work for 
frozen types.

{{SelectStatement}} tries to use one {{ColumnFilter}} instance for all 
executions of a (prepared) statement. In case the terms for the element/slice 
sub-selection are dynamic ones (bound parameters, function calls), a new 
{{ColumnFilter}} needs to be created for each execution in order to benefit 
from its select/slice capabilities.

The new class {{SelectionRestriction}} is used as a descriptor of column 
element/slice/full selections. Each individual selection has its own 
{{SelectionRestriction}} instance.

{{Term.Raw}} got a new function {{isConstant}}, which is needed to determine 
whether a {{SelectionRestriction}} refers to a constant/literal value.

Some {{Selector}} methods now take {{QueryOptions}} instead of {{int 
protocolVersion}}, which is needed to resolve bound variables and functions for 
element/slice bounds.

{{Selection}} now distinguishes between {{ByteBuffer}}s and 
{{ComplexColumnData}}. The {{ComplexColumnData}} is used to use the “raw” cells 
for collection select/slice before these get serialized. That 
{{ComplexColumnData}} is then passed to {{CollectionSerializer}}.

One maybe annoying thing in the syntax is the use of two dots to separate slice 
bounds. Given a {{map}} and doing a slice selection like {{SELECT 
col\[1..5\]}} will result in a parser failure, because it interprets {{1.}} as 
the start of a floating point literal and then complains about the 2nd dot. 
Workaround is to put a space between ({{SELECT col\[1 .. 5\]}}). I thought 
about using {{:}} as a separator, but that is the start of a bind parameter. 
{{-}} is already “occupied” by negative numeric values. {{;}} is the end of a 
statement. Using a keyword like {{TO}} makes unbounded slice queried look a bit 
awkward ({{SELECT col\[ TO 5\]}} or {{SELECT col\[5 TO \]}}.

> Allow selecting Map key, List index
> ---
>
> Key: CASSANDRA-7396
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
> Project: Cassandra
>  Issue Type: New Feature
>  Components: CQL
>Reporter: Jonathan Ellis
>Assignee: Robert Stupp
>  Labels: cql
> Fix For: 3.x
>
> Attachments: 7396_unit_tests.txt
>
>
> Allow "SELECT map['key]" and "SELECT list[index]."  (Selecting a UDT subfield 
> is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2015-06-09 Thread Stefania (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefania updated CASSANDRA-7396:

Attachment: 7396_unit_tests.txt

The dtests that were written for this ticket are being migrated to java unit 
tests, see CASSANDRA-9160. I am attaching the java equivalent of the dtests, 
_7396_unit_tests.txt_. You need to add it to your patch, picking the cql3 unit 
test file that is more appropriate. I was not able to test them so there could 
be conversion typos or mistakes.

 Allow selecting Map key, List index
 ---

 Key: CASSANDRA-7396
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Robert Stupp
  Labels: cql
 Fix For: 3.x

 Attachments: 7396_unit_tests.txt


 Allow SELECT map['key] and SELECT list[index].  (Selecting a UDT subfield 
 is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2015-03-11 Thread Aleksey Yeschenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-7396:
-
Fix Version/s: (was: 3.0)
   3.1

 Allow selecting Map key, List index
 ---

 Key: CASSANDRA-7396
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Robert Stupp
  Labels: cql
 Fix For: 3.1


 Allow SELECT map['key] and SELECT list[index].  (Selecting a UDT subfield 
 is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7396) Allow selecting Map key, List index

2014-11-10 Thread Philip Thompson (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-7396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philip Thompson updated CASSANDRA-7396:
---
Tester: Philip Thompson

[~snazy] I've written some tentative dtests based on the grammar you outlined. 
Thoughts?

https://github.com/riptano/cassandra-dtest/commit/331e704a9406c3ade1e99d949767a86e6601b52a

 Allow selecting Map key, List index
 ---

 Key: CASSANDRA-7396
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7396
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Robert Stupp
  Labels: cql
 Fix For: 3.0


 Allow SELECT map['key] and SELECT list[index].  (Selecting a UDT subfield 
 is already supported.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)