ajantha-bhat commented on a change in pull request #3774:
URL: https://github.com/apache/carbondata/pull/3774#discussion_r458689351



##########
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:
       why the changes in this function ?
   
   As user wanted to created geoSpatial column, we created an extra column, 
select * from table  should include all the columns.
   
   If the target table don't want geo column, user can specify projections.
   
   **we should not skip spatial column while doing insert into**
   
   @VenuReddy2103 , @ShreelekhyaG 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to