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 7E40211ED2 for ; Wed, 16 Jul 2014 08:32:10 +0000 (UTC) Received: (qmail 78193 invoked by uid 500); 16 Jul 2014 08:32:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 78082 invoked by uid 500); 16 Jul 2014 08:32:05 -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 77744 invoked by uid 99); 16 Jul 2014 08:32:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2014 08:32:05 +0000 Date: Wed, 16 Jul 2014 08:32:05 +0000 (UTC) From: "Mihai Suteu (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-6910) Better table structure display in cqlsh 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-6910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Suteu updated CASSANDRA-6910: ----------------------------------- Attachment: cassandra6910.patch here is my patch for this issue. the colours I chose are currently: - red for partition key - cyan for clustering key - and the default magenta for the others I experimented with others, but these look best imo there is also a screenshot attached I branched off cassandra-2.1 and the diff is also for that branch. > Better table structure display in cqlsh > --------------------------------------- > > Key: CASSANDRA-6910 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6910 > Project: Cassandra > Issue Type: Improvement > Components: Tools > Reporter: Tupshin Harper > Priority: Minor > Labels: lhf > Attachments: cassandra6910.patch, screenshot-mihai.jpg > > > It should be possible to make it more immediately obvious what the structure of your CQL table is from cqlsh. Two minor enhancements could go a long way: > 1) If there are no results display the column headers anyway. Right now, if you are trying to do a query and get no results, it's common to need to display the table schema to figure out what you did wrong. Having the columns displayed whenever you do a query wouldn't get in the way, and would provide a more visual way than by describing the table. > 2) Along with the first one, if we could highlight the partition/clustering columns in different colors, it would be much more intuitively > understandable what the underlying partition structure is. > tl;dr: the forms below should each have distinct visual representation when displaying the column headers, and the column headers should always be shown. > CREATE TABLE usertest ( > userid text, > email text, > name text, > PRIMARY KEY (userid) > ) > CREATE TABLE usertest2 ( > userid text, > email text, > name text, > PRIMARY KEY (userid, email) > ) > CREATE TABLE usertest3 ( > userid text, > email text, > name text, > PRIMARY KEY ((userid, email)) > ) -- This message was sent by Atlassian JIRA (v6.2#6252)