gengliangwang commented on code in PR #45578:
URL: https://github.com/apache/spark/pull/45578#discussion_r1529689335


##########
connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroUtils.scala:
##########
@@ -197,19 +197,20 @@ private[sql] object AvroUtils extends Logging {
 
     def hasNextRow: Boolean = {
       while (!completed && currentRow.isEmpty) {
-        if (fileReader.pastSync(stopPosition)) {
+        // In some cases of empty blocks in an Avro file, 
`fileReader.hasNext()` returns false but

Review Comment:
   Could you explain what's the "some cases" here. It looks weird to call 
`hasNext` 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to