jonvex commented on code in PR #13503:
URL: https://github.com/apache/hudi/pull/13503#discussion_r2178438844


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/streaming/HoodieStreamSourceV2.scala:
##########
@@ -123,10 +130,21 @@ class HoodieStreamSourceV2(sqlContext: SQLContext,
           DataSourceReadOptions.START_COMMIT.key() -> startCompletionTime,
           DataSourceReadOptions.END_COMMIT.key() -> endOffset.offsetCommitTime
         )
-        val rdd = CDCRelation.getCDCRelation(sqlContext, metaClient, 
cdcOptions, rangeType)
-          .buildScan0(HoodieCDCUtils.CDC_COLUMNS, Array.empty)
-
-        sqlContext.sparkSession.internalCreateDataFrame(rdd, 
CDCRelation.FULL_CDC_SPARK_SCHEMA, isStreaming = true)
+        if (useNewParquetFileFormat) {
+          val relation = if (tableType == HoodieTableType.COPY_ON_WRITE) {

Review Comment:
   org.apache.hudi.DefaultSource#createSource handles this for us. It will use 
V1 if it is an older version of the table



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