Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1651#discussion_r156607909
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateUtil.scala
---
@@ -514,9 +514,16 @@ object PreAggregateUtil {
CarbonCommonConstants.VALIDATE_CARBON_INPUT_SEGMENTS +
parentCarbonTable.getDatabaseName + "." +
parentCarbonTable.getTableName, validateSegments.toString)
- val headers =
parentCarbonTable.getTableInfo.getDataMapSchemaList.asScala.
-
find(_.getChildSchema.getTableName.equals(dataMapIdentifier.table)).get.getChildSchema.
- getListOfColumns.asScala.map(_.getColumnName).mkString(",")
+ val dataMapSchemas =
parentCarbonTable.getTableInfo.getDataMapSchemaList.asScala
+ val headers =
dataMapSchemas.find(_.getChildSchema.getTableName.equalsIgnoreCase(
+ dataMapIdentifier.table)) match {
+ case Some(dataMapSchema) =>
+
dataMapSchema.getChildSchema.getListOfColumns.asScala.map(_.getColumnName).mkString(",")
+ case None =>
--- End diff --
when this condition will come??
---