datafuselabs / databend

๐——๐—ฎ๐˜๐—ฎ, ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ & ๐—”๐—œ. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.31k stars 704 forks source link

refactor: refactor merge into optimizer and fix unexpected distribution plan #15507

Closed xudong963 closed 5 days ago

xudong963 commented 2 weeks ago

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

Summary

  1. support explain pipeline merge into
  2. support explain fragments merge into
  3. reduce the occurrence of *distributed && !*change_join_order
  4. inner join can directly use broadcast join, don't need to add RowNumber operator
  5. reduce the complexity of merge into optimizer.
  6. improve merge into distribution plan, see the file tests/sqllogictests/suites/mode/cluster/merge_into_non_equal_distributed.test

Tests

Type of change


This change isโ€‚Reviewable