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

Port tests in limit.rs to sqllogictest #8315

Merged
merged 4 commits into from
Nov 28, 2023
Merged

Conversation

zhangxffff
Copy link
Contributor

Which issue does this PR close?

Closes #8204 .
SubTask of #6195 .

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Nov 23, 2023
statement ok
CREATE TABLE t1000 (i BIGINT) AS
WITH t AS (VALUES (0), (0), (0), (0), (0), (0), (0), (0), (0), (0))
SELECT ROW_NUMBER() OVER (PARTITION BY t1.column1) FROM t t1, t t2, t t3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I double checked that this actually generates partitioned input and it does indeed.

You can see on my local setup that the MemoryExec has multiple partitions

❯ explain select distinct i  from t1000;
+---------------+-----------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                |
+---------------+-----------------------------------------------------------------------------------------------------+
| logical_plan  | Aggregate: groupBy=[[t1000.i]], aggr=[[]]                                                           |
|               |   TableScan: t1000 projection=[i]                                                                   |
| physical_plan | AggregateExec: mode=FinalPartitioned, gby=[i@0 as i], aggr=[]                                       |
|               |   CoalesceBatchesExec: target_batch_size=8192                                                       |
|               |     RepartitionExec: partitioning=Hash([i@0], 16), input_partitions=16                              |
|               |       AggregateExec: mode=Partial, gby=[i@0 as i], aggr=[]                                          |
|               |         MemoryExec: partitions=16, partition_sizes=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 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 took the liberty of updating some comments / adding an explain tests in 26510c9

@alamb
Copy link
Contributor

alamb commented Nov 28, 2023

Since I had it checked out anyways, I fixed the clippy issues in f5015ad and pushed to this branch

@alamb
Copy link
Contributor

alamb commented Nov 28, 2023

Thank you very much @zhangxffff -- this is a great initial contribution. I really appreciate it

@alamb alamb merged commit 975b012 into apache:main Nov 28, 2023
22 checks passed
@zhangxffff zhangxffff deleted the port_test branch November 29, 2023 02:26
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 limit.rs to sqllogictest
2 participants