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

test: Port (last) repartition.rs query to sqllogictest #8936

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

simicd
Copy link
Contributor

@simicd simicd commented Jan 21, 2024

Which issue does this PR close?

Closes #8212

Rationale for this change

Move tests to sqllogictest

What changes are included in this PR?

  • Set up unbounded query with repartition and coalesce to sqllogictest

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jan 21, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @simicd -- this looks reasonable to me but I am not quite sure about the equivalence of these tests

@metesynnada I reviewed #5278 and given the changes in DataFusion since then I am not quite sure how to map its findings to this test.

Can you double check and provide your feedback on if the test proposed in this PR is equivalent to the test in repartition.rs?

----CoalesceBatchesExec: target_batch_size=8192
------FilterExec: c3@2 > 0
--------RepartitionExec: partitioning=RoundRobinBatch(3), input_partitions=1
----------StreamingTableExec: partition_sizes=1, projection=[c1, c2, c3], infinite_source=true
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

--CoalescePartitionsExec
----CoalesceBatchesExec: target_batch_size=8192
------FilterExec: c3@2 > 0
--------RepartitionExec: partitioning=RoundRobinBatch(3), input_partitions=1
Copy link
Contributor

Choose a reason for hiding this comment

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

This partitioning is round robin partitioning where the original test uses hash partitioning. I am not sure if that is equivalent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see! Thanks for looking into it

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think there will be a difference. It's hard to reproduce the hash partitioning with unbounded tables. However, this would work well enough.

simicd and others added 2 commits January 21, 2024 14:50
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
--CoalescePartitionsExec
----CoalesceBatchesExec: target_batch_size=8192
------FilterExec: c3@2 > 0
--------RepartitionExec: partitioning=RoundRobinBatch(3), input_partitions=1
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think there will be a difference. It's hard to reproduce the hash partitioning with unbounded tables. However, this would work well enough.

@alamb
Copy link
Contributor

alamb commented Jan 25, 2024

I took the liberty of merging this branch into main to resolve a merge conflict and plan to merge it once CI passes

@alamb alamb merged commit 6e4abf5 into apache:main Jan 25, 2024
22 checks passed
@alamb
Copy link
Contributor

alamb commented Jan 25, 2024

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port tests in repartition.rs to sqllogictest
3 participants