kz930 opened a new issue, #8598:
URL: https://github.com/apache/texera/issues/8598

   ### 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
   
   ```shell
   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]))
   ```
   


-- 
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]

Reply via email to