Skip to content

Merge adjacent CompoundChunkOperators #7930

Open
@leiysky

Description

@leiysky

When building Pipeline, we will directly map the PhysicalPlan to the corresponding Processors.

It's possible to merge adjacent CompoundChunkOperators if there are adjacent Filter and EvalScalar.

In the following case, we can merge CompoundChunkOperator of EvalScalar and Filter:

mysql> explain select number+1 from numbers(10) where number < 5;
+----------------------------------------------------------------------+
| explain                                                              |
+----------------------------------------------------------------------+
| EvalScalar                                                           |
| ├── expressions: [+(numbers.number (#0), 1)]                         |
| └── Filter                                                           |
|     ├── filters: [<(numbers.number (#0), 5)]                         |
|     └── TableScan                                                    |
|         ├── table: default.system.numbers                            |
|         ├── read rows: 10                                            |
|         ├── read bytes: 80                                           |
|         ├── partitions total: 1                                      |
|         ├── partitions scanned: 1                                    |
|         └── push downs: [filters: [(number < 5)], limit: NONE]       |
+----------------------------------------------------------------------+
11 rows in set (0.18 sec)
Read 0 rows, 0.00 B in 0.045 sec., 0 rows/sec., 0.00 B/sec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-executorArea: processor and shuffleC-improvementCategory: improvementstaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions