ajantha-bhat commented on a change in pull request #3634: [CARBONDATA-3720]
Support alter table scenario for new insert into flow
URL: https://github.com/apache/carbondata/pull/3634#discussion_r383663627
##########
File path:
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala
##########
@@ -449,67 +443,48 @@ case class CarbonInsertIntoCommand(databaseNameOp:
Option[String],
}
}
- private def isAlteredSchema(tableSchema: TableSchema): Boolean = {
- if (tableInfo.getFactTable.getSchemaEvolution != null) {
- tableInfo
- .getFactTable
- .getSchemaEvolution
- .getSchemaEvolutionEntryList.asScala.exists(entry =>
- (entry.getAdded != null && entry.getAdded.size() > 0) ||
- (entry.getRemoved != null && entry.getRemoved.size() > 0)
- )
- } else {
- false
- }
- }
-
def getReArrangedIndexAndSelectedSchema(
tableInfo: TableInfo,
partitionColumnSchema: mutable.Buffer[ColumnSchema]): (Seq[Int],
Seq[ColumnSchema]) = {
var reArrangedIndex: Seq[Int] = Seq()
var selectedColumnSchema: Seq[ColumnSchema] = Seq()
- var complexChildCount: Int = 0
var partitionIndex: Seq[Int] = Seq()
- val columnSchema = tableInfo.getFactTable.getListOfColumns.asScala
+ val internalOrderColumns: util.ArrayList[CarbonColumn] = new
util.ArrayList[CarbonColumn]()
+ internalOrderColumns.addAll(table.getVisibleDimensions)
+ internalOrderColumns.addAll(table.getVisibleMeasures)
+ val columnSchema = internalOrderColumns.asScala.map(col =>
col.getColumnSchema)
Review comment:
yes, can be done like this now. previously it was used for something else
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services