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 97119200D3E for ; Thu, 16 Nov 2017 09:29:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 959E4160BE6; Thu, 16 Nov 2017 08:29:01 +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 D24B9160BE5 for ; Thu, 16 Nov 2017 09:29:00 +0100 (CET) Received: (qmail 32063 invoked by uid 500); 16 Nov 2017 08:29:00 -0000 Mailing-List: contact issues-help@carbondata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.apache.org Delivered-To: mailing list issues@carbondata.apache.org Received: (qmail 32054 invoked by uid 99); 16 Nov 2017 08:29:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 08:29:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EFA3EDFF17; Thu, 16 Nov 2017 08:28:59 +0000 (UTC) From: akashrn5 To: issues@carbondata.apache.org Reply-To: issues@carbondata.apache.org References: In-Reply-To: Subject: [GitHub] carbondata pull request #1432: [CARBONDATA-1608]Support Column Comment for C... Content-Type: text/plain Message-Id: <20171116082859.EFA3EDFF17@git1-us-west.apache.org> Date: Thu, 16 Nov 2017 08:28:59 +0000 (UTC) archived-at: Thu, 16 Nov 2017 08:29:01 -0000 Github user akashrn5 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1432#discussion_r151345725 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala --- @@ -424,11 +424,20 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser { def getFields(schema: Seq[StructField]): Seq[Field] = { schema.map { col => - val x = if (col.dataType.catalogString == "float") { - '`' + col.name + '`' + " double" - } - else { - '`' + col.name + '`' + ' ' + col.dataType.catalogString + val colComment = col.getComment() + val x = if (colComment.isDefined) { + val columnComment = " comment \"" + colComment.get + "\"" --- End diff -- handled, please review ---