What happened?
A File Scan with Extract on, Include Filename on, and any attribute type that reads the file line by line cannot run. It fails building its first tuple.
The two halves disagree about how many fields a row has. FileScanSourceOpDesc.sourceSchema prepends a filename column whenever Include Filename is set, so the schema is two columns wide. FileScanUtils.createTuplesFromFile only carries the entry's name in its single-value branch: the line-by-line branch emits the value alone, whatever the flag says. Enforcing a one-field tuple against a two-column schema throws.
Include Filename is only offered when Extract is on, so every configuration that reaches this combination is one the panel invites.
Expected: either the line-by-line branch carries the entry name it was asked for, or the schema stops declaring a column the rows will not hold.
How to reproduce?
Build a zip holding one text file, point a File Scan at it with extract and outputFileName both true and the attribute type left at string, and drain FileScanSourceOpExec. The schema reads filename, line; the first tuple carries one field.
Version/Branch
1.4.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
2ab8ee0
What browsers are you seeing the problem on?
No response
Relevant log output
SCHEMA = Schema[Attribute[name=filename, type=string], Attribute[name=line, type=string]]
ENFORCED = Failure(org.apache.texera.amber.core.tuple.TupleBuildingException: Tuple does not have the same number of attributes as schema. Missing attributes are List(Attribute[name=line, type=string]))
What happened?
A File Scan with Extract on, Include Filename on, and any attribute type that reads the file line by line cannot run. It fails building its first tuple.
The two halves disagree about how many fields a row has.
FileScanSourceOpDesc.sourceSchemaprepends afilenamecolumn whenever Include Filename is set, so the schema is two columns wide.FileScanUtils.createTuplesFromFileonly carries the entry's name in its single-value branch: the line-by-line branch emits the value alone, whatever the flag says. Enforcing a one-field tuple against a two-column schema throws.Include Filename is only offered when Extract is on, so every configuration that reaches this combination is one the panel invites.
Expected: either the line-by-line branch carries the entry name it was asked for, or the schema stops declaring a column the rows will not hold.
How to reproduce?
Build a zip holding one text file, point a File Scan at it with
extractandoutputFileNameboth true and the attribute type left atstring, and drainFileScanSourceOpExec. The schema readsfilename,line; the first tuple carries one field.Version/Branch
1.4.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
2ab8ee0
What browsers are you seeing the problem on?
No response
Relevant log output