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

#30: Added sorting and merging of overlapping chunks to be safe #31

Merged
merged 7 commits into from
Sep 21, 2021

Conversation

morazow
Copy link
Contributor

@morazow morazow commented Sep 20, 2021

Fixes #30.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

88.2% 88.2% Coverage
0.0% 0.0% Duplication

* @return a list of sorted and merged chunks
*/
public List<ChunkInterval> sortAndMerge(final List<ChunkInterval> chunks) {
if (chunks == null || chunks.size() <= 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍


// [utest->dsn~read-parquet-file-chunks-contents~1]
class RowParquetChunkReaderTest {

private static final int RECORD_COUNT = 200000;

@ParameterizedTest
@NullAndEmptySource
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't know this. Very helpful!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, definitely, I also found it accidentally while reading on ValueSource :)

@morazow morazow merged commit 952c9a4 into main Sep 21, 2021
@morazow morazow deleted the refactor/#30-sort-and-merge-overlaps branch September 21, 2021 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort and merge chunks to be safe
2 participants