From 32e2fee37dad168e27d384a8d77cc748f3e1aa92 Mon Sep 17 00:00:00 2001 From: jackierwzhang Date: Thu, 13 Apr 2023 13:53:06 -0700 Subject: [PATCH] cmt --- .../org/apache/spark/sql/delta/sources/DeltaSource.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSource.scala b/core/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSource.scala index 76ba3ba4080..b24d6d7600f 100644 --- a/core/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSource.scala +++ b/core/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSource.scala @@ -218,7 +218,7 @@ trait DeltaSourceBase extends Source isStartingVersion: Boolean, limits: Option[AdmissionLimits] = Some(new AdmissionLimits())): ClosableIterator[IndexedFile] = { - var iter = if (options.readChangeFeed) { + val iter = if (options.readChangeFeed) { // In this CDC use case, we need to consider RemoveFile and AddCDCFiles when getting the // offset. @@ -242,8 +242,8 @@ trait DeltaSourceBase extends Source } } } - iter = stopIndexedFileIteratorAtSchemaChangeBarrier(iter) - iter + // Stop before any schema change barrier if detected. + stopIndexedFileIteratorAtSchemaChangeBarrier(iter) } /**