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

fix(query): expr children with projectset not fold count #10827

Merged
merged 6 commits into from
Apr 2, 2023

Conversation

TCeason
Copy link
Collaborator

@TCeason TCeason commented Mar 29, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

img_v2_33a415da-1d15-4840-b02a-79ba46ab9b7g

expr children with projectset not fold count

Closes #10826

@vercel
Copy link

vercel bot commented Mar 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
databend ⬜️ Ignored (Inspect) Visit Preview Apr 2, 2023 5:07am

@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label Mar 29, 2023
@TCeason TCeason force-pushed the unnest_without_trivial_count branch from 6a68bb1 to ce2d7d4 Compare March 29, 2023 13:03
@TCeason TCeason requested review from sundy-li and andylokandy March 29, 2023 13:17
@andylokandy andylokandy requested a review from leiysky March 29, 2023 14:34
@leiysky
Copy link
Contributor

leiysky commented Mar 30, 2023

This should be fixed by setting the precise_cardinality to None here:https://github.com/datafuselabs/databend/blob/14e0e4c59d31010f032cd31c5d77b2d2fdd56599/src/query/sql/src/planner/plans/project_set.rs#L51-L61

@TCeason TCeason force-pushed the unnest_without_trivial_count branch from 4cbaf2a to 8d52530 Compare March 31, 2023 02:17
@TCeason TCeason force-pushed the unnest_without_trivial_count branch 2 times, most recently from 89fa2fc to 8712fe9 Compare March 31, 2023 02:52
@TCeason TCeason force-pushed the unnest_without_trivial_count branch 2 times, most recently from 421e336 to 0df2cc4 Compare March 31, 2023 08:40
@TCeason
Copy link
Collaborator Author

TCeason commented Mar 31, 2023

https://github.com/datafuselabs/databend/actions/runs/4573208115/jobs/8073531552?pr=10827

Waiting on databend-query 10 seconds...
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
... connecting to :3307
Traceback (most recent call last):
  File "/runner/_work/databend/databend/scripts/ci/wait_tcp.py", line 38, in <module>
    tcp_ping(args.port, args.timeout)
  File "/runner/_work/databend/databend/scripts/ci/wait_tcp.py", line 26, in tcp_ping
    raise Exception("fail to connect to :{}".format(port))
Exception: fail to connect to :3307
Databend Query


Looks like the ci has some question? I try to re-run it also report this error. cc @BohuTANG

@BohuTANG
Copy link
Member

BohuTANG commented Apr 1, 2023


Looks like the ci has some question? I try to re-run it also report this error. cc @BohuTANG

Yes, @everpcpc will help us to address it.

@BohuTANG
Copy link
Member

BohuTANG commented Apr 1, 2023

@mergify update

@mergify
Copy link
Contributor

mergify bot commented Apr 1, 2023

update

✅ Branch has been successfully updated

@BohuTANG
Copy link
Member

BohuTANG commented Apr 1, 2023

[Diff] (-expected|+actual)
-   ProjectSet
+   EvalScalar
+   ├── expressions: [get(unnest (#1))]
    ├── estimated rows: 10.00
-   ├── set returning functions: unnest([1, 2, 3])
-   └── TableScan
-       ├── table: default.system.numbers
-       ├── read rows: 10
-       ├── read bytes: 80
-       ├── partitions total: 1
-       ├── partitions scanned: 1
-       ├── push downs: [filters: [], limit: NONE]
-       └── estimated rows: 10.00
+   └── ProjectSet
+       ├── estimated rows: 10.00
+       ├── set returning functions: unnest([1, 2, 3])
+       └── TableScan
+           ├── table: default.system.numbers
+           ├── read rows: 10
+           ├── read bytes: 80
+           ├── partitions total: 1
+           ├── partitions scanned: 1
+           ├── push downs: [filters: [], limit: NONE]
+           └── estimated rows: 10.00
at tests/sqllogictests/suites/mode/standalone/explain/project_set.test:10

@TCeason TCeason force-pushed the unnest_without_trivial_count branch 2 times, most recently from 5180f8c to fe14376 Compare April 2, 2023 01:51
@TCeason TCeason force-pushed the unnest_without_trivial_count branch from fe14376 to 7414544 Compare April 2, 2023 05:07
@mergify mergify bot merged commit 720fa46 into databendlabs:main Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: unnest should not fold count
5 participants