A file scan extracting an archive cannot also include the filename

Open
#8,598 0 comments 0 reactions 1 assignee View on GitHub

@kz930 is already working on this.

Since Sep 19, 2026.

Assessment

This issue has not been assessed yet.

Description

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)

2ab8ee0f2

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]))
Dominant language
Scala
Stars
316
Forks
189
Avg merge
2d 20h
Merged PRs (30d)
198

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/texera

All issues in apache/texera

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.