JeremyXin commented on PR #12768:
URL: https://github.com/apache/seatunnel/pull/12768#issuecomment-6183852780

   @DanielLeens Thank you for the detailed review. I agree that partially 
matching headers can change the output of existing jobs that previously relied 
on positional reading. However, the old implementation method of reading by 
index might itself have errors.
   
   I’d prefer to keep the current behavior for partial matches: when a header 
is used for mapping, a schema field with no matching header produces `null`. 
Falling back to a positional index for that field could read a value from a 
different column after the Excel columns are reordered. This is also consistent 
with how the CSV reader maps fields when header reading is enabled. I’ll add a 
warning log that identifies unmatched field.
   
   To keep this PR focused, I used `skip_header_row_number` to identify the 
header row, following the existing EasyExcel reading flow, and applied the same 
rule to POI. In a follow-up, I’ll explore using `csv_use_header_line` as a 
common header-presence setting for CSV and Excel.


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