carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kunal642 <...@git.apache.org>
Subject [GitHub] carbondata pull request #1651: [CARBONDATA-1891] Fixed timeseries table crea...
Date Wed, 13 Dec 2017 10:08:16 GMT
Github user kunal642 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1651#discussion_r156611792
  
    --- 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 --
    
    This is just to throw a proper exception if ever this condition is met. The message will
tell which aggregate table is not present in the datamap schema list. 


---

Mime
View raw message