Skip to content

fix(workflow-operator): remember legacy CSV EOF - #9620

Draft
Matthew-DWM wants to merge 1 commit into
apache:mainfrom
Matthew-DWM:fix/csv-old-eof
Draft

Matthew-DWM wants to merge 1 commit into
apache:mainfrom
Matthew-DWM:fix/csv-old-eof

Conversation

@Matthew-DWM

Copy link
Copy Markdown

What changes were proposed in this PR?

The scala-csv iterator retries the read after EOF. Amber can poll it again after closing the CSV (old) reader, which raises Stream closed. The legacy scan now remembers normal EOF in the iterator created by each open(). Read and parse exceptions still propagate.

Before  EOF -> close reader -> poll again -> Stream closed
After   EOF -> close reader -> poll again -> false

Any related issues, documentation, discussions?

Closes #9619

How was this PR tested?

Four new regression cases failed with Stream closed on the unchanged baseline. After the fix, all 160 selected scan tests passed, including checks for reopening, limits, malformed CSV, and read errors. Scalafix and both formatting checks passed.

The run used JDK 17, UDF_PYTHON_PATH pointing to the project’s Python 3.12 interpreter with pandas, and matching pre-generated jOOQ sources.

sbt -J-Xmx2g -J-Xms256m -J-Djava.io.tmpdir=/tmp -batch \
  'set DAO / Compile / sourceGenerators := Seq.empty' \
  'WorkflowOperator/scalafixAll --check' \
  'WorkflowOperator/scalafmtCheck' \
  'WorkflowOperator/Test/scalafmtCheck' \
  'WorkflowOperator/testOnly *CSVOldScanSourceOpExecSpec *CSVOldScanSourceOpDescSpec *ScanSourceOpDescSpec *CSVScanSourceOpDescSpec *CSVScanSourceOpExecSpec *ParallelCSVScanSourceOpExecSpec *JSONLScanSourceOpExecSpec'

A local Amber probe (WorkflowExecutionService/testOnly *CSVOldCompletionProbeSpec) ran the three-row CSV (old) → Projection workflow from the linked issue. Before the fix, the no-limit and limit 4 cases failed, and the limit 3 control passed. After the fix, all three cases completed with every expected row, value, column name, and type.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: OpenAI Codex (GPT-6.2 Sol)

Keep the scan exhausted after Amber closes the reader. Preserve read and parse errors before EOF.
@Yicong-Huang Yicong-Huang added release/v1.3 back porting to release/v1.3 release/v1.2 back porting to release/v1.2 labels Nov 22, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 November 22, 2026 02:16
@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.
✅ release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @kz930, @eugenegujing
    You can notify them by mentioning @kz930, @eugenegujing in a comment.

@xuang7

xuang7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Removing release/v1.2: not a regression, and CSV File Scan can be used instead.

@xuang7 xuang7 removed the release/v1.2 back porting to release/v1.2 label Nov 23, 2026
@Matthew-DWM
Matthew-DWM marked this pull request as draft November 23, 2026 17:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common fix release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSV (old) fails with Stream closed after reading to EOF

3 participants