niuge01 commented on a change in pull request #3542: [CARBONDATA-3640] Insert from stage command support partition table URL: https://github.com/apache/carbondata/pull/3542#discussion_r361839187
########## File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertFromStageCommand.scala ########## @@ -375,5 +466,37 @@ case class CarbonInsertFromStageCommand( } } + /** + * create DataFrame basing on specified splits + */ + private def createInputDataFrameOfInternalRow( + sparkSession: SparkSession, + carbonTable: CarbonTable, + splits: Seq[InputSplit] + ): DataFrame = { + val columns = carbonTable + .getCreateOrderColumn + .asScala + .map(_.getColName) + .toArray + val schema = SparkTypeConverter.createSparkSchema(carbonTable, columns) + val rdd: RDD[Row] = new CarbonScanRDD[InternalRow]( + sparkSession, + columnProjection = new CarbonProjection(columns), + null, + carbonTable.getAbsoluteTableIdentifier, + carbonTable.getTableInfo.serialize, + carbonTable.getTableInfo, + new CarbonInputMetrics, + null, + null, + classOf[SparkRowReadSupportImpl], + splits.asJava) Review comment: done ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services