the-other-tim-brown commented on code in PR #17904:
URL: https://github.com/apache/hudi/pull/17904#discussion_r2756002777


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/lance/SparkLanceReaderBase.scala:
##########
@@ -133,12 +147,19 @@ class SparkLanceReaderBase(enableVectorizedReader: 
Boolean) extends SparkColumna
 
           // Append partition values to each row using JoinedRow, then convert 
to UnsafeRow
           val joinedRow = new JoinedRow()
-          iter.map(row => unsafeProjection(joinedRow(row, 
file.partitionValues)))
+          projectedIter.map(row => unsafeProjection(joinedRow(row, 
file.partitionValues)))
         }
 
       } catch {
         case e: Exception =>
-          allocator.close()
+          // Only clean up if listener wasn't registered
+          if (!cleanupRegistered) {

Review Comment:
   Can we always call close on error? Does it cause an error if it is closed 
twice?



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