alexeykudinkin commented on a change in pull request #4709:
URL: https://github.com/apache/hudi/pull/4709#discussion_r804322208



##########
File path: 
hudi-spark-datasource/hudi-spark2/src/main/scala/org/apache/spark/sql/adapter/Spark2Adapter.scala
##########
@@ -86,4 +87,14 @@ class Spark2Adapter extends SparkAdapter {
   override def parseMultipartIdentifier(parser: ParserInterface, sqlText: 
String): Seq[String] = {
     throw new IllegalStateException(s"Should not call 
ParserInterface#parseMultipartIdentifier for spark2")
   }
+
+  /**
+   * Combine [[PartitionedFile]] to [[FilePartition]] according to 
`maxSplitBytes`.
+   */
+  override def getFilePartitions(
+      sparkSession: SparkSession,
+      partitionedFiles: Seq[PartitionedFile],
+      maxSplitBytes: Long): Seq[FilePartition] = {
+    HoodieDataSourceHelper.getFilePartitions(sparkSession, partitionedFiles, 
maxSplitBytes)

Review comment:
       It'd actually be the other way around: `Spark2Adapter` should hold the 
impl copied from Spark3, while `HoodieDataSourceHelper` will be invoking it




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to