Matthew-DWM opened a new issue, #9619:
URL: https://github.com/apache/texera/issues/9619

   ### What happened?
   
   Amber polls the CSVOld File Scan iterator after closing the reader. The 
scala-csv iterator retries the read after EOF, so the workflow fails with 
`java.io.IOException: Stream closed` after the scan has read the file.
   
   A scan with no limit or a limit larger than the input should complete with 
all available rows.
   
   ### How to reproduce?
   
   1. Save this UTF-8 fixture as `legacy-eof.csv` and add it to a dataset.
   
      ```csv
      id,name
      1,猫
      2,"line one
      line two"
      3,last
      ```
   
   2. Connect **CSVOld File Scan** to **Projection**. Select the file, enable 
the header, and project `id` and `name`.
   3. Run once with **Limit** blank and once with **Limit** set to `4`. Both 
runs fail with `Stream closed` after reading the three rows.
   4. Set **Limit** to `3` and run again. The workflow completes with all three 
rows.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   f030df12b73c2c6a8f2e8b325c6e762d54fead7f
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   java.io.IOException: Stream closed
       at java.base/java.io.BufferedReader.ensureOpen(BufferedReader.java:123)
       ...
       at com.github.tototoshi.csv.CSVReader$$anon$1.hasNext(CSVReader.scala:63)
       ...
       at 
org.apache.texera.amber.engine.architecture.messaginglayer.OutputManager$DPOutputIterator.hasNext(OutputManager.scala:88)
   ```


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