You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "kz930 (via GitHub)" <gi...@apache.org> on 2026/09/18 22:52:13 UTC
[I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
kz930 opened a new issue, #8602:
URL: https://github.com/apache/texera/issues/8602
### What happened?
The Limit on a file-scan source is meant to bound how many rows the operator outputs. It also bounds the sample `sourceSchema()` reads to infer the columns, so a Limit of 0 leaves the inference nothing to look at and the operator reports a schema that does not describe the file.
The three readers fail differently on the same file. CSV File Scan and JSONL File Scan return a schema with no attributes at all. CSVOld File Scan throws `ArrayIndexOutOfBoundsException`, because it takes the column names from the header row and the types from the sample, then asks the empty type array for the first header's type.
Zero is a value the property editor accepts, and it is the natural way to ask for no rows. The columns of a file do not depend on how many of its rows the user wants, so a Limit of 0 should give an operator with the file's schema and an empty output, not one with no columns or one that throws.
### How to reproduce?
Point a CSVOld File Scan at a CSV with a header and a couple of data rows, set Limit to 0, and run. The execution fails as the executor is constructed, on the operator's own schema inference, before a row is read. The same two steps on a CSV File Scan or a JSONL File Scan instead give downstream operators an operator with no columns.
Set Limit to 1 on any of the three and the schema is correct again, which is what tells the two concerns apart: `CSVOldScanSourceOpDesc.sourceSchema` reads its inference sample from `slice(startOffset, startOffset + limit)`, and `CSVScanSourceOpDesc` and `JSONLScanSourceOpDesc` bound theirs the same way.
### Version/Branch
1.4.0-incubating-SNAPSHOT (main)
### Commit Hash (Optional)
e7d1676e1
### What browsers are you seeing the problem on?
_No response_
### Relevant log output
```shell
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.apache.texera.amber.operator.source.scan.csvOld.CSVOldScanSourceOpDesc.$anonfun$sourceSchema$8(CSVOldScanSourceOpDesc.scala:204)
at org.apache.texera.amber.operator.source.scan.csvOld.CSVOldScanSourceOpDesc.sourceSchema(CSVOldScanSourceOpDesc.scala:201)
at org.apache.texera.amber.operator.source.scan.csvOld.CSVOldScanSourceOpExec.<init>(CSVOldScanSourceOpExec.scala:38)
```
--
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: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "VuMartin (via GitHub)" <gi...@apache.org>.
VuMartin commented on issue #8602:
URL: https://github.com/apache/texera/issues/8602#issuecomment-5739869576
/take
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on issue #8602:
URL: https://github.com/apache/texera/issues/8602#issuecomment-5737166797
There are two ways to fix this. Stop bounding the inference sample by Limit, which settles all three readers but changes the inferred types of workflows that already set a small one; or only stop CSVOld from indexing an empty type array, which changes nothing that runs today but leaves CSV and JSONL with a column-less schema. I would take the first, since a file's columns do not depend on how many rows the user wants, and can write either.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "aglinxinyuan (via GitHub) via notifications" <no...@texera.apache.org>.
aglinxinyuan closed issue #8602: A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws
URL: https://github.com/apache/texera/issues/8602
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "VuMartin (via GitHub)" <gi...@apache.org>.
VuMartin commented on issue #8602:
URL: https://github.com/apache/texera/issues/8602#issuecomment-5744968673
I’ll untake since #8341 already addresses #8602. Thanks for the heads up!
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "VuMartin (via GitHub)" <gi...@apache.org>.
VuMartin commented on issue #8602:
URL: https://github.com/apache/texera/issues/8602#issuecomment-5744969485
/untake
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8602:
URL: https://github.com/apache/texera/issues/8602#issuecomment-5737129721
<!-- texera:template-compliance -->
👋 Thanks for opening this issue, @kz930!
It looks like the issue description doesn't quite follow our template yet:
- This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A file scan with Limit 0 loses the file's columns, and the CSVOld scan throws [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on issue #8602:
URL: https://github.com/apache/texera/issues/8602#issuecomment-5744597465
Heads up before you spend time on this: the fix is already in #8341, which closes it. It takes the first option above, the inference sample no longer reads through Limit, in the CSV, parallel CSV, CSVOld and JSONL scans.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org