carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1476: [CARBONDATA-1527] [CARBONDATA-1528] [PreAgg] ...
Date Mon, 13 Nov 2017 10:08:55 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1476#discussion_r150493129
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateListeners.scala
---
    @@ -79,3 +79,190 @@ object LoadPostAggregateListener extends OperationEventListener {
         }
       }
     }
    +
    +object PreAggregateDataTypeChangePreListener extends OperationEventListener {
    +  /**
    +   * Called on a specified event occurrence
    +   *
    +   * @param event
    +   * @param operationContext
    +   */
    +  override def onEvent(event: Event, operationContext: OperationContext): Unit = {
    +    val dataTypeChangePreListener = event.asInstanceOf[AlterTableDataTypeChangePreEvent]
    +    val carbonTable = dataTypeChangePreListener.carbonTable
    +    val alterTableDataTypeChangeModel = dataTypeChangePreListener.alterTableDataTypeChangeModel
    +    val columnToBeAltered: String = alterTableDataTypeChangeModel.columnName
    +    val dataMapSchemas = carbonTable.getTableInfo.getDataMapSchemaList
    +    if (dataMapSchemas != null && !dataMapSchemas.isEmpty) {
    +      dataMapSchemas.asScala.foreach {
    +        dataMapSchema =>
    --- End diff --
    
    move to above line


---

Mime
View raw message