Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C7B119C51 for ; Wed, 2 Mar 2016 01:49:18 +0000 (UTC) Received: (qmail 79901 invoked by uid 500); 2 Mar 2016 01:49:18 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 79855 invoked by uid 500); 2 Mar 2016 01:49:18 -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 79705 invoked by uid 99); 2 Mar 2016 01:49:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 01:49:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 265FE2C1F62 for ; Wed, 2 Mar 2016 01:49:18 +0000 (UTC) Date: Wed, 2 Mar 2016 01:49:18 +0000 (UTC) From: "Stefania (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11274) cqlsh: interpret CQL type for formatting blob types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15174840#comment-15174840 ] Stefania commented on CASSANDRA-11274: -------------------------------------- bq. I noted: inet is now being formatted green instead of yellow. It actually looks like it wasn't hitting {{@formatter_for('inet')}} in previously, and now it is. I guess this is probably correct, but I'm just pointing out the difference. Thanks for pointing this out, I hadn't noticed it. Green is the correct color for inet, the colors are specified at the bottom of _displaying.py_. bq. Without Cython, the formatter assumptions fail: I fixed the formatter thanks. I've also fixed the COPY FROM date converter. bq. With Cython, the deserializer has the same overflow that the patch is working around: For the time being I've removed the cython deserializer so that we fall back to the patched function. I will also apply this fix to the 3.0 patch of CASSANDRA-11053 since CASSANDRA-10625 was delivered to 3.0 as well. Latest changes are [here|https://github.com/stef1927/cassandra/commit/20d8e58bb3607bb5bce730a9da48c4b69ae90f00]. CI restarted. > cqlsh: interpret CQL type for formatting blob types > --------------------------------------------------- > > Key: CASSANDRA-11274 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11274 > Project: Cassandra > Issue Type: Improvement > Components: Tools > Reporter: Stefania > Assignee: Stefania > Fix For: 3.x > > > During the development of CASSANDRA-11053 we have added changes to the cqlsh formatting code so that we can format {{blob}} types correctly even if they are represented as {{str}} rather than {{bytearray}}. > At the moment we ensure {{blob}} are of type {{bytearray}} via the following shortcut: > {code} > cassandra.cqltypes.BytesType.deserialize = staticmethod(lambda byts, protocol_version: bytearray(byts)) > {code} > After CASSANDRA-11053 is committed there will be a similar shortcut to override the fast serializers implemented in cython. > Decoding the CQL type is safer in that it decouples cqlsh formatting from the types returned by the driver deserializers but it is also unnecessary for CASSANDRA-11053 performance goals and risky for older releases. > Therefore this ticket delivers this functionality but only on trunk. -- This message was sent by Atlassian JIRA (v6.3.4#6332)