[CARBONDATA-3841] Remove useless string in create and alter command

Why is this PR needed?
1. LoadDataCommand has duplicated info about user input. Since SQL plan is printed in
driver log and showed on SparkUI, we want to make it pretty.
2. Some variable/file are not in used.

What changes were proposed in this PR?
Remove the duplicated info and unused variable/file.

Does this PR introduce any user interface change?
No

Is any new testcase added?
No

This closes #3784
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala
index 1ecb004..9e6491e 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchemaCommon.scala
@@ -113,7 +113,6 @@
     segmentUpdateStatusManager: Option[SegmentUpdateStatusManager],
     compactionType: String,
     factTimeStamp: Option[Long],
-    var alterSql: String,
     customSegmentIds: Option[List[String]] = None)
 
 case class UpdateTableModel(
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala
index a331e7b..b17969b 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala
@@ -52,7 +52,6 @@
     dimFilesPath: Seq[DataLoadTableFileMapping],
     options: Map[String, String],
     isOverwriteTable: Boolean,
-    var inputSqlString: String = null,
     partition: Map[String, Option[String]] = Map.empty,
     var operationContext: OperationContext = new OperationContext)
   extends AtomicRunnableCommand {
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/HorizontalCompaction.scala b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/HorizontalCompaction.scala
index 8d329d8..e99045b 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/HorizontalCompaction.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/HorizontalCompaction.scala
@@ -143,8 +143,7 @@
         carbonTable.getTableName,
         Some(segmentUpdateStatusManager),
         CompactionType.IUD_UPDDEL_DELTA.toString,
-        Some(factTimeStamp),
-        "")
+        Some(factTimeStamp))
 
       CarbonAlterTableCompactionCommand(alterTableModel).run(sparkSession)
     }
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/partition/CarbonAlterTableAddHivePartitionCommand.scala b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/partition/CarbonAlterTableAddHivePartitionCommand.scala
index 46d6cdc..c5e40ef 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/partition/CarbonAlterTableAddHivePartitionCommand.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/execution/command/partition/CarbonAlterTableAddHivePartitionCommand.scala
@@ -173,7 +173,6 @@
           segmentUpdateStatusManager = None,
           compactionType = "", // to trigger index merge, this is not required
           factTimeStamp = Some(System.currentTimeMillis()),
-          alterSql = null,
           customSegmentIds = customSegmentIds)
         val mergeIndexEvent = AlterTableMergeIndexEvent(sparkSession, table, alterTableModel)
         OperationListenerBus.getInstance.fireEvent(mergeIndexEvent, new OperationContext)
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala b/integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala
index ce4a0d7..c4d7add 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/listeners/MVListeners.scala
@@ -71,8 +71,7 @@
             viewIdentifier.getTableName,
             None,
             compactionType.toString,
-            Some(System.currentTimeMillis()),
-            "")
+            Some(System.currentTimeMillis()))
           operationContext.setProperty(
             viewIdentifier.getDatabaseName + "_" +
             viewIdentifier.getTableName + "_Segment",
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala b/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
index 9840381..4bf49c9 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
@@ -60,15 +60,7 @@
       phrase(start)(new lexical.Scanner(input)) match {
         case Success(plan, _) =>
           CarbonScalaUtil.cleanParserThreadLocals()
-          plan match {
-            case x: CarbonLoadDataCommand =>
-              x.inputSqlString = input
-              x
-            case x: CarbonAlterTableCompactionCommand =>
-              x.alterTableModel.alterSql = input
-              x
-            case logicalPlan => logicalPlan
-        }
+          plan
         case failureOrError =>
           CarbonScalaUtil.cleanParserThreadLocals()
           CarbonException.analysisException(failureOrError.toString)
@@ -113,7 +105,7 @@
       opt(";") ^^ {
       case dbName ~ table ~ (compact ~ compactType) ~ segs =>
         val alterTableModel = AlterTableModel(CarbonParserUtil.convertDbNameToLowerCase(dbName),
-          table, None, compactType, Some(System.currentTimeMillis()), null, segs)
+          table, None, compactType, Some(System.currentTimeMillis()), segs)
         CarbonAlterTableCompactionCommand(alterTableModel)
     }
 
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala b/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala
index 71e54ff..197fec4 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala
@@ -762,7 +762,6 @@
       dimFilesPath = Seq(),
       options = optionsMap,
       isOverwriteTable = isOverwrite.isDefined,
-      inputSqlString = null,
       partition = partitionSpec)
   }
 }
diff --git a/integration/spark/src/main/scala/org/apache/spark/util/Compaction.scala b/integration/spark/src/main/scala/org/apache/spark/util/Compaction.scala
index 91203a1..ff02d7a 100644
--- a/integration/spark/src/main/scala/org/apache/spark/util/Compaction.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/util/Compaction.scala
@@ -39,8 +39,7 @@
         tableName,
         None,
         compactionType,
-        Some(System.currentTimeMillis()),
-        "")).run(spark)
+        Some(System.currentTimeMillis()))).run(spark)
     }
     else {
       CarbonException.analysisException("Compaction type is wrong. Please select minor or major.")
diff --git a/processing/src/main/java/org/apache/carbondata/processing/loading/row/CarbonSortBatch.java b/processing/src/main/java/org/apache/carbondata/processing/loading/row/CarbonSortBatch.java
deleted file mode 100644
index f2c67d2..0000000
--- a/processing/src/main/java/org/apache/carbondata/processing/loading/row/CarbonSortBatch.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.carbondata.processing.loading.row;
-
-import org.apache.carbondata.core.datastore.row.CarbonRow;
-import org.apache.carbondata.processing.loading.sort.unsafe.merger.UnsafeSingleThreadFinalSortFilesMerger;
-
-/**
- * Batch of sorted rows which are ready to be processed by
- */
-public class CarbonSortBatch extends CarbonRowBatch {
-
-  private UnsafeSingleThreadFinalSortFilesMerger iterator;
-
-  public CarbonSortBatch(UnsafeSingleThreadFinalSortFilesMerger iterator) {
-    super(0);
-    this.iterator = iterator;
-  }
-
-  @Override
-  public boolean hasNext() {
-    return iterator.hasNext();
-  }
-
-  @Override
-  public CarbonRow next() {
-    return new CarbonRow(iterator.next());
-  }
-
-  @Override
-  public void close() {
-    iterator.close();
-  }
-}