[jira] [Updated] (CASSANDRA-8779) Add type code to binary query parameters in QUERY messages

2016-07-05 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-8779:
---
Assignee: (was: Tyler Hobbs)

> Add type code to binary query parameters in QUERY messages
> --
>
> Key: CASSANDRA-8779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8779
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: CQL
> Environment: Linux Mint 64-bit | ruby-driver 2.1 | java-driver 2.1 | 
> C* 2.1.2
>Reporter: Kishan Karunaratne
>  Labels: client-impacting, protocolv5
> Fix For: 3.x
>
>
> If I insert a tuple using an extra pair of ()'s, C* will let me do the 
> insert, but (incorrectly) creates a nested tuple as the first tuple value. 
> Upon doing a select statement, the result is jumbled and has weird binary in 
> it (which I wasn't able to copy into here).
> Example using ruby-driver:
> {noformat}
> session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b 
> frozen>)")
> complete = Cassandra::Tuple.new('foo', 123, true)
> session.execute("INSERT INTO mytable (a, b) VALUES (0, (?))", arguments: 
> [complete])# extra ()'s here
> result = session.execute("SELECT b FROM mytable WHERE a=0").first
> p result['b']
> {noformat}
> Output:
> {noformat}
> #
> {noformat}
> Bug also confirmed using java-driver. 
> Example using java-driver:
> {noformat}
> session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b 
> frozen>)");
> TupleType t = TupleType.of(DataType.ascii(), DataType.cint(), 
> DataType.cboolean());
> TupleValue complete = t.newValue("foo", 123, true);
> session.execute("INSERT INTO mytable (a, b) VALUES (0, (?))", complete); // 
> extra ()'s here
> TupleValue r = session.execute("SELECT b FROM mytable WHERE 
> a=0").one().getTupleValue("b");
> System.out.println(r);
> {noformat}
> Output:
> {noformat}
> ('foo{', null, null)
> {noformat}



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


[jira] [Updated] (CASSANDRA-8779) Add type code to binary query parameters in QUERY messages

2015-10-23 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-8779:

Issue Type: Sub-task  (was: Improvement)
Parent: CASSANDRA-9362

> Add type code to binary query parameters in QUERY messages
> --
>
> Key: CASSANDRA-8779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8779
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: API
> Environment: Linux Mint 64-bit | ruby-driver 2.1 | java-driver 2.1 | 
> C* 2.1.2
>Reporter: Kishan Karunaratne
>Assignee: Tyler Hobbs
>  Labels: client-impacting, protocolv5
> Fix For: 3.x
>
>
> If I insert a tuple using an extra pair of ()'s, C* will let me do the 
> insert, but (incorrectly) creates a nested tuple as the first tuple value. 
> Upon doing a select statement, the result is jumbled and has weird binary in 
> it (which I wasn't able to copy into here).
> Example using ruby-driver:
> {noformat}
> session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b 
> frozen>)")
> complete = Cassandra::Tuple.new('foo', 123, true)
> session.execute("INSERT INTO mytable (a, b) VALUES (0, (?))", arguments: 
> [complete])# extra ()'s here
> result = session.execute("SELECT b FROM mytable WHERE a=0").first
> p result['b']
> {noformat}
> Output:
> {noformat}
> #
> {noformat}
> Bug also confirmed using java-driver. 
> Example using java-driver:
> {noformat}
> session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b 
> frozen>)");
> TupleType t = TupleType.of(DataType.ascii(), DataType.cint(), 
> DataType.cboolean());
> TupleValue complete = t.newValue("foo", 123, true);
> session.execute("INSERT INTO mytable (a, b) VALUES (0, (?))", complete); // 
> extra ()'s here
> TupleValue r = session.execute("SELECT b FROM mytable WHERE 
> a=0").one().getTupleValue("b");
> System.out.println(r);
> {noformat}
> Output:
> {noformat}
> ('foo{', null, null)
> {noformat}



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


[jira] [Updated] (CASSANDRA-8779) Add type code to binary query parameters in QUERY messages

2015-10-23 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-8779:

Labels: client-impacting protocolv5  (was: client-impacting protocolv4)

> Add type code to binary query parameters in QUERY messages
> --
>
> Key: CASSANDRA-8779
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8779
> Project: Cassandra
>  Issue Type: Improvement
>  Components: API
> Environment: Linux Mint 64-bit | ruby-driver 2.1 | java-driver 2.1 | 
> C* 2.1.2
>Reporter: Kishan Karunaratne
>Assignee: Tyler Hobbs
>  Labels: client-impacting, protocolv5
> Fix For: 3.x
>
>
> If I insert a tuple using an extra pair of ()'s, C* will let me do the 
> insert, but (incorrectly) creates a nested tuple as the first tuple value. 
> Upon doing a select statement, the result is jumbled and has weird binary in 
> it (which I wasn't able to copy into here).
> Example using ruby-driver:
> {noformat}
> session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b 
> frozen>)")
> complete = Cassandra::Tuple.new('foo', 123, true)
> session.execute("INSERT INTO mytable (a, b) VALUES (0, (?))", arguments: 
> [complete])# extra ()'s here
> result = session.execute("SELECT b FROM mytable WHERE a=0").first
> p result['b']
> {noformat}
> Output:
> {noformat}
> #
> {noformat}
> Bug also confirmed using java-driver. 
> Example using java-driver:
> {noformat}
> session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b 
> frozen>)");
> TupleType t = TupleType.of(DataType.ascii(), DataType.cint(), 
> DataType.cboolean());
> TupleValue complete = t.newValue("foo", 123, true);
> session.execute("INSERT INTO mytable (a, b) VALUES (0, (?))", complete); // 
> extra ()'s here
> TupleValue r = session.execute("SELECT b FROM mytable WHERE 
> a=0").one().getTupleValue("b");
> System.out.println(r);
> {noformat}
> Output:
> {noformat}
> ('foo{', null, null)
> {noformat}



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


[jira] [Updated] (CASSANDRA-8779) Add type code to binary query parameters in QUERY messages

2015-02-20 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-8779:
---
  Component/s: API
Fix Version/s: 3.0
   Labels: client-impacting protocolv4  (was: )
   Issue Type: Improvement  (was: Bug)
  Summary: Add type code to binary query parameters in QUERY messages  
(was: Able to unintentionally nest tuples during insert)

 Add type code to binary query parameters in QUERY messages
 --

 Key: CASSANDRA-8779
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8779
 Project: Cassandra
  Issue Type: Improvement
  Components: API
 Environment: Linux Mint 64-bit | ruby-driver 2.1 | java-driver 2.1 | 
 C* 2.1.2
Reporter: Kishan Karunaratne
Assignee: Tyler Hobbs
  Labels: client-impacting, protocolv4
 Fix For: 3.0


 If I insert a tuple using an extra pair of ()'s, C* will let me do the 
 insert, but (incorrectly) creates a nested tuple as the first tuple value. 
 Upon doing a select statement, the result is jumbled and has weird binary in 
 it (which I wasn't able to copy into here).
 Example using ruby-driver:
 {noformat}
 session.execute(CREATE TABLE mytable (a int PRIMARY KEY, b 
 frozentupleascii, bigint, boolean))
 complete = Cassandra::Tuple.new('foo', 123, true)
 session.execute(INSERT INTO mytable (a, b) VALUES (0, (?)), arguments: 
 [complete])# extra ()'s here
 result = session.execute(SELECT b FROM mytable WHERE a=0).first
 p result['b']
 {noformat}
 Output:
 {noformat}
 #Cassandra::Tuple:0x97b328 (fo{, , )
 {noformat}
 Bug also confirmed using java-driver. 
 Example using java-driver:
 {noformat}
 session.execute(CREATE TABLE mytable (a int PRIMARY KEY, b 
 frozentupleascii, int, boolean));
 TupleType t = TupleType.of(DataType.ascii(), DataType.cint(), 
 DataType.cboolean());
 TupleValue complete = t.newValue(foo, 123, true);
 session.execute(INSERT INTO mytable (a, b) VALUES (0, (?)), complete); // 
 extra ()'s here
 TupleValue r = session.execute(SELECT b FROM mytable WHERE 
 a=0).one().getTupleValue(b);
 System.out.println(r);
 {noformat}
 Output:
 {noformat}
 ('foo{', null, null)
 {noformat}



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