Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CsvTokenizer independent from LineDecoder #9

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

dmikurube
Copy link
Member

@dmikurube dmikurube commented Aug 20, 2021

CsvTokenizer has been constructed with LineDecoder from embulk-util-text. It made CsvTokenizer depends on embulk-util-text, but it is not an essentially-required dependency. LineDecoder inherits Iterable<String>.

Instead of LineDecoder, this PR modifies CsvTokenizer with Iterator<String>. We have to give up CsvTokenizer#nextFile, but users of CsvTokenizer can call FileInput#nextFile on their side.

@dmikurube dmikurube added this to the v0.1.0 milestone Aug 20, 2021
@dmikurube
Copy link
Member Author

Check that the first commit eb281b5 also passes the tests. It means that the replacement with Iterator<String> is working fine without any modification in tests.

Copy link

@vietnguyen-td vietnguyen-td left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from CsvTokenizer-independent-from-CsvParserPlugin to master August 23, 2021 07:23
@dmikurube
Copy link
Member Author

Thanks!

@dmikurube dmikurube merged commit 3fbf432 into master Aug 23, 2021
@dmikurube dmikurube deleted the CsvTokenizer-independent-from-LineDecoder branch August 23, 2021 07:23
dmikurube added a commit that referenced this pull request Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants