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 CDCA5200D55 for ; Sat, 25 Nov 2017 04:17:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C32FC160C11; Sat, 25 Nov 2017 03:17:21 +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 0BAE2160BF2 for ; Sat, 25 Nov 2017 04:17:20 +0100 (CET) Received: (qmail 27302 invoked by uid 500); 25 Nov 2017 03:17:20 -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 27293 invoked by uid 99); 25 Nov 2017 03:17:19 -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; Sat, 25 Nov 2017 03:17:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A77EADFC3E; Sat, 25 Nov 2017 03:17:18 +0000 (UTC) From: QiangCai To: issues@carbondata.apache.org Reply-To: issues@carbondata.apache.org References: In-Reply-To: Subject: [GitHub] carbondata pull request #1564: [CARBONDATA-1610][Streaming] Reject alter tab... Content-Type: text/plain Message-Id: <20171125031718.A77EADFC3E@git1-us-west.apache.org> Date: Sat, 25 Nov 2017 03:17:18 +0000 (UTC) archived-at: Sat, 25 Nov 2017 03:17:22 -0000 Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1564#discussion_r153036781 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala --- @@ -156,11 +156,22 @@ class DDLStrategy(sparkSession: SparkSession) extends SparkStrategy { case AlterTableSetPropertiesCommand(tableName, properties, isView) if CarbonEnv.getInstance(sparkSession).carbonMetastore .tableExists(tableName)(sparkSession) => { + val property = properties.find(_._1.equalsIgnoreCase("streaming")) + if (property.isDefined) { + if (!property.get._2.trim.equalsIgnoreCase("true")) { + throw new MalformedCarbonCommandException( + "Unsupported alter table to disable streaming property") --- End diff -- fixed ---