bytechef icon indicating copy to clipboard operation
bytechef copied to clipboard

3288 - CSV file empty headers fix

Open karlocehulic19 opened this issue 1 month ago • 2 comments

Description

Enables empty and duplicate header names by creating a small header parser and then using the parsed header string. This is a draft PR to confirm that this implementation satisfies CSV component usage needs.

Fixes #3288

This successfully passes all integration and unit tests for the CSV component, but it fails in the Gradle check, and I have yet to figure out why, after I confirm this is a valid approach for the given issue.

karlocehulic19 avatar Nov 05 '25 17:11 karlocehulic19

@igorbeslic could you review this PR?

karlocehulic19 avatar Nov 05 '25 17:11 karlocehulic19

@igorbeslic, I believe I fixed all requested changes mentioned in commit b6fb396. I am not sure why CI failed, I did gradle checks, and they passed locally.

I also added another test case for csv file without a header row, but with a special delimiter (This test prevents CsvFormat.DEFAULT implementation to pass), can easily be dropped if it's not needed.

We can sync up if needed.

karlocehulic19 avatar Nov 11 '25 13:11 karlocehulic19

@karlocehulic19 we merged... there are couple technical details that we have to go through. We disabled test because read logic is not good... This is HINT... If CSV file has header line, that line should be red only once. In current implementation, readHeaderValues is called every time. Lets say this is not done yet. We will sync.

igorbeslic avatar Nov 16 '25 21:11 igorbeslic