From issues-return-92227-archive-asf-public=cust-asf.ponee.io@carbondata.apache.org Fri Jul 24 12:54:26 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 5472618037A for ; Fri, 24 Jul 2020 14:54:26 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id BA46C1252D3 for ; Fri, 24 Jul 2020 12:54:03 +0000 (UTC) Received: (qmail 40817 invoked by uid 500); 24 Jul 2020 12:54:03 -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 40808 invoked by uid 99); 24 Jul 2020 12:54:03 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2020 12:54:03 +0000 From: =?utf-8?q?GitBox?= To: issues@carbondata.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bcarbondata=5D_ShreelekhyaG_commented_on_a_change_i?= =?utf-8?q?n_pull_request_=233774=3A_=5BCARBONDATA-3833=5D_Make_geoID_visibl?= =?utf-8?q?e?= Message-ID: <159559524344.29655.2251744650121161408.asfpy@gitbox.apache.org> Date: Fri, 24 Jul 2020 12:54:03 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: ShreelekhyaG commented on a change in pull request #3774: URL: https://github.com/apache/carbondata/pull/3774#discussion_r460033679 ########## File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala ########## @@ -170,11 +171,18 @@ case class CarbonInsertIntoCommand(databaseNameOp: Option[String], convertedStaticPartition) scanResultRdd = sparkSession.sessionState.executePlan(newLogicalPlan).toRdd if (logicalPartitionRelation != null) { - if (selectedColumnSchema.length != logicalPartitionRelation.output.length) { + val properties = table.getTableInfo.getFactTable.getTableProperties.asScala + val spatialProperty = properties.get(CarbonCommonConstants.SPATIAL_INDEX) + var expectedOutput = logicalPartitionRelation.output + if (spatialProperty.isDefined && selectedColumnSchema.size + 1 == expectedOutput.length) { Review comment: Yes, select *from table includes all columns including geoSpatial. I have added a testcase for that now. This change is when a user tries to insert with original schema. Like `sql(s"insert into $table1 select 1575428400000,116285807,40084087")` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org