You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Kishan Karunaratne (JIRA)" <ji...@apache.org> on 2015/02/11 00:19:12 UTC

[jira] [Created] (CASSANDRA-8779) Able to unintentionally nest tuples during insert

Kishan Karunaratne created CASSANDRA-8779:
---------------------------------------------

             Summary: Able to unintentionally nest tuples during insert
                 Key: CASSANDRA-8779
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8779
             Project: Cassandra
          Issue Type: Bug
         Environment: Linux Mint 64-bit | ruby-driver 2.1 | java-driver 2.1 | C* 2.1.2
            Reporter: Kishan Karunaratne


Example using ruby-driver:
{noformat}
session.execute("CREATE TABLE mytable (a int PRIMARY KEY, b frozen<tuple<ascii, bigint, boolean>>)")

complete = Cassandra::Tuple.new('foo', 123, true)
session.execute("INSERT INTO mytable (a, b) VALUES (0, ?)", arguments: [complete])
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. Output:
{noformat}
('foo{', null, null)
{noformat}



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