aglinxinyuan opened a new pull request, #9679: URL: https://github.com/apache/texera/pull/9679
### What changes were proposed in this PR? `CSVScanSourceOpDescSpec` and `TextInputSourceOpDescSpec` repeated their fixtures case by case. Each spec now shares them: - `CSVScanSourceOpDescSpec` writes every temporary CSV through one `writeCsv(body)`, in place of six single-purpose writers, a delimiter-replacing writer and four inline blocks. `pointAt` points a descriptor at a file and resolves it, and `rowsOf` runs an executor on a descriptor's JSON and returns the fields of every row. `assertCountrySalesSchema` checks the five country sales schema cases, and `assertReadsByPlaceholder` checks the two placeholder cases. The two cases that built the three CSV scans by hand now take them from `allReaders`, which also takes a limit. The headerless-offset case runs its export through the spec's existing `runStandalone`. - `TextInputSourceOpDescSpec` reads every executor run through `tuplesFromEngine`. It replaces the same fifteen-line block in five cases, `booleansFromEngine` and the number case's inline copy. `linesFrom` also takes the file and the attribute type, so the STRING and SINGLE_STRING cases read through it. Each case still reads its values with the type it used before, so the INTEGER case still fails on a value that is not an `Int`. Every test keeps its name, its position, its inputs and its expected values. Only test code changes. ### Any related issues, documentation, discussions? Closes #9678. ### How was this PR tested? - `sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.scan.csv.CSVScanSourceOpDescSpec org.apache.texera.amber.operator.source.scan.text.TextInputSourceOpDescSpec"`, with `UDF_PYTHON_PATH` set to a Python that has pandas: the 54 tests (34 and 20) pass on main and on this branch, with the same names in the same order, compared case by case from the JUnit XML reports. None was cancelled, so the Python export cases ran. - Mutation check: making `rowsOf` drop the last row, `assertCountrySalesSchema` expect DOUBLE for the integer column and `tuplesFromEngine` drop the first tuple fails 21 of the 54 tests, each of them one that reads through the broken helper. - `sbt "WorkflowOperator/scalafmtCheck" "WorkflowOperator/Test/scalafmtCheck" "WorkflowOperator/scalafix --check" "WorkflowOperator/Test/scalafix --check"` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Antigravity (Gemini) and Claude Code (Claude Opus 5.5) -- 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]
