Skip to content

Simplify union node with empty input#21186

Merged
feilong-liu merged 1 commit intoprestodb:masterfrom
feilong-liu:union_empty
Oct 22, 2023
Merged

Simplify union node with empty input#21186
feilong-liu merged 1 commit intoprestodb:masterfrom
feilong-liu:union_empty

Conversation

@feilong-liu
Copy link
Contributor

Description

Simplify a union node when it has at least one empty input but more than one non-empty input

Motivation and Context

Current optimization rule only simplify the union node when all input is empty or only one input is non-empty. This PR will simplify for the case where it has at least one empty input but more than one non-empty input.

Impact

Simplify for more query plans.

Test Plan

Unit test

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Fix the simplify plan with empty input rule to also work for union node with empty input but more than one non-empty input.

@feilong-liu feilong-liu force-pushed the union_empty branch 4 times, most recently from ab4bc12 to 00ae2d7 Compare October 20, 2023 06:03
@feilong-liu feilong-liu merged commit cb589d4 into prestodb:master Oct 22, 2023
@wanglinsong wanglinsong mentioned this pull request Dec 8, 2023
26 tasks
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.

4 participants