Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A6DC3200CD7 for ; Tue, 1 Aug 2017 12:03:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A5950166D77; Tue, 1 Aug 2017 10:03:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EAFCF166D6F for ; Tue, 1 Aug 2017 12:03:07 +0200 (CEST) Received: (qmail 45498 invoked by uid 500); 1 Aug 2017 10:03:06 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 45487 invoked by uid 99); 1 Aug 2017 10:03:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 10:03:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2EFF318041D for ; Tue, 1 Aug 2017 10:03:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Cw2EFMZcJpz6 for ; Tue, 1 Aug 2017 10:03:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 123E25FD1B for ; Tue, 1 Aug 2017 10:03:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 90433E0D28 for ; Tue, 1 Aug 2017 10:03:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 498B724651 for ; Tue, 1 Aug 2017 10:03:00 +0000 (UTC) Date: Tue, 1 Aug 2017 10:03:00 +0000 (UTC) From: =?utf-8?Q?Andr=C3=A9s_de_la_Pe=C3=B1a_=28JIRA=29?= To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13573) ColumnMetadata.cellValueType() doesn't return correct type for non-frozen collection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 01 Aug 2017 10:03:08 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-13573?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16108673#comment-16108673 ]=20 Andr=C3=A9s de la Pe=C3=B1a commented on CASSANDRA-13573: ----------------------------------------------- The patch looks good to me, excellent job. The assertion at {{ColumnMetadata#cellValueType()}} to check that the preco= ndition mentioned in the comment is satisfied makes sense to me. There are some minor nits about code style: * There are some missed space-after-comma at {{ViewTest#testFrozenCollectio= nsWithComplicatedInnerType()}}. Also, it would be nice for the sake of unif= ormity to align the create table and create view statement as they are in s= imilar tests in the same file. * It would be good to add a {{@jira_ticket CASSANDRA-13573}} tag in the dte= st docstring. * This is just an idea, but I think that the dtest {{CREATE TABLE}} and ins= ertion could be more readable using a cell per line, something like: {code} session.execute('CREATE TABLE ks.cf (' 'key int PRIMARY KEY,' 'list_f frozen>,' 'set_f frozen>, ' 'map_f frozen>,' 'tuple_f frozen>, ' 'user_type_f frozen, ' 'list_v list,' 'set_v set,' 'map_v map,' 'tuple_v tuple,' 'user_type_v simple_type)') ... session.execute(statement, [1, [1, 2, 3], # list_f {1, 2, 3}, # set_f {1: 1, 2: 2, 3: 3}, # map_f (9, 9), # map_f FrozenUserType('SG', 100100, {'321', '123'}), = # user_type_f [1, 2], # list_v {1, 2}, # set_v {1: 1, 2: 2}, # map_v (8, 8), # tuple_v NonFrozenUserType('SG', 100100) # user_type_v ]) {code} What do you think? > ColumnMetadata.cellValueType() doesn't return correct type for non-frozen= collection > -------------------------------------------------------------------------= ----------- > > Key: CASSANDRA-13573 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1357= 3 > Project: Cassandra > Issue Type: Bug > Components: Core, CQL, Materialized Views, Tools > Reporter: Stefano Ortolani > Assignee: ZhaoYang > > Schema and data" > {noformat} > CREATE TABLE ks.cf ( > hash blob, > report_id timeuuid, > subject_ids frozen>, > PRIMARY KEY (hash, report_id) > ) WITH CLUSTERING ORDER BY (report_id DESC); > INSERT INTO ks.cf (hash, report_id, subject_ids) VALUES (0x1213, now(), {= 1,2,4,5}); > {noformat} > sstabledump output is: > {noformat} > sstabledump mc-1-big-Data.db=20 > [ > { > "partition" : { > "key" : [ "1213" ], > "position" : 0 > }, > "rows" : [ > { > "type" : "row", > "position" : 16, > "clustering" : [ "ec01eed0-49d9-11e7-b39a-97a96f529c02" ], > "liveness_info" : { "tstamp" : "2017-06-05T10:29:57.434856Z" }, > "cells" : [ > { "name" : "subject_ids", "value" : "" } > ] > } > ] > } > ] > {noformat} > While the values are really there: > {noformat} > cqlsh:ks> select * from cf ; > hash | report_id | subject_ids > --------+--------------------------------------+------------- > 0x1213 | 02bafff0-49d9-11e7-b39a-97a96f529c02 | {1, 2, 4} > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org