Skip to content

Merge expressions#17458

Merged
alesapin merged 9 commits intomasterfrom
merge-expressions
Dec 7, 2020
Merged

Merge expressions#17458
alesapin merged 9 commits intomasterfrom
merge-expressions

Conversation

@KochetovNicolai
Copy link
Copy Markdown
Member

@KochetovNicolai KochetovNicolai commented Nov 26, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Add optimization which combines consecutive Expression steps of query plan in to single one.This is not an improvement and, probably, does not affect performance. It will be useful later, when it will be possible to split actions.

EXPLAIN optimize = 0, actions = 1
SELECT 1 + a
FROM 
(
    SELECT 1 + number AS a
    FROM numbers(1)
)

Query id: 8c8b965a-bb9c-427b-8150-3720cdfc44b0

┌─explain─────────────────────────────────────────────────────────────────────────┐
│ Expression (Projection)                                                         │
│ Actions: INPUT :: 0 -> plus(1, a) UInt64 : 0                                    │
│   Expression (Before ORDER BY and SELECT)                                       │
│   Actions: INPUT : 0 -> a UInt64 : 0                                            │
│            COLUMN Const(UInt8) -> 1 UInt8 : 1                                   │
│            FUNCTION plus(1 :: 1, a :: 0) -> plus(1, a) UInt64 : 2               │
│     Expression (Projection)                                                     │
│     Actions: INPUT : 0 -> plus(1, number) UInt64 : 0                            │
│              ALIAS plus(1, number) :: 0 -> a UInt64 : 1                         │
│       Expression (Before ORDER BY and SELECT)                                   │
│       Actions: INPUT : 0 -> number UInt64 : 0                                   │
│                COLUMN Const(UInt8) -> 1 UInt8 : 1                               │
│                FUNCTION plus(1 :: 1, number :: 0) -> plus(1, number) UInt64 : 2 │
│         SettingQuotaAndLimits (Set limits and quota after reading from storage) │
│           ReadFromStorage (SystemNumbers)                                       │
└─────────────────────────────────────────────────────────────────────────────────┘

EXPLAIN actions = 1
SELECT 1 + a
FROM 
(
    SELECT 1 + number AS a
    FROM numbers(1)
)

Query id: 88492546-f7f4-4b00-906b-08bc7ecc1a75

┌─explain────────────────────────────────────────────────────────────────────────────────────────┐
│ Expression (Projection + Before ORDER BY and SELECT + Projection + Before ORDER BY and SELECT) │
│ Actions: INPUT : 0 -> number UInt64 : 0                                                        │
│          COLUMN Const(UInt8) -> 1 UInt8 : 1                                                    │
│          COLUMN Const(UInt8) -> 1 UInt8 : 2                                                    │
│          FUNCTION plus(1 :: 1, number :: 0) -> plus(1, number) UInt64 : 3                      │
│          ALIAS plus(1, number) :: 3 -> a UInt64 : 0                                            │
│          FUNCTION plus(1 :: 2, a :: 0) -> plus(1, a) UInt64 : 3                                │
│   SettingQuotaAndLimits (Set limits and quota after reading from storage)                      │
│     ReadFromStorage (SystemNumbers)                                                            │
└────────────────────────────────────────────────────────────────────────────────────────────────┘

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 26, 2020
@KochetovNicolai KochetovNicolai marked this pull request as ready for review November 27, 2020 10:17
@alesapin alesapin self-assigned this Nov 27, 2020
@alesapin
Copy link
Copy Markdown
Member

alesapin commented Dec 1, 2020

01415_sticking_mutations flaky test

@alesapin
Copy link
Copy Markdown
Member

alesapin commented Dec 1, 2020

Query id: 8dcde8aa-4666-4c3e-887c-3d0e8d2578ac

┌────check_start_time─┬─test_name────────────────┬─test_status─┬─report_url─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 2020-12-01 08:17:44 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/0/0739ed8f9792b9fb48690f4f7ce2d8831aaa5210/functional_stateless_tests_(address).html                         │
│ 2020-11-30 23:10:39 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17109/9c801239cf34a9aee454799a68c14f2d9bf893a5/functional_stateless_tests_(release).html                     │
│ 2020-11-30 11:06:13 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17109/8fd0810142aae494e4152c2b16b2ae61284f6913/functional_stateless_tests_(release).html                     │
│ 2020-11-29 09:29:16 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17542/27063ad160ed9926274bab2bb1b38cd83af169ce/functional_stateless_tests_(release,_wide_parts_enabled).html │
│ 2020-11-27 19:33:43 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/0/aaaa7ad59fef422b8f00fcf7908258c2b638e5db/functional_stateless_tests_(debug).html                           │
│ 2020-11-27 14:21:13 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/0/37c4133a230467bdba732ea381838b4ea5513459/functional_stateless_tests_(memory).html                          │
│ 2020-11-27 11:48:06 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17458/f3bea2210cd4a1f0153562436975ed64d131159b/functional_stateless_tests_(release).html                     │
│ 2020-11-26 21:45:47 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17453/6c87a9753f3e74337f8522293ff0789f86098294/functional_stateless_tests_(release,_wide_parts_enabled).html │
│ 2020-11-26 05:48:23 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17043/217021dd89a21ebfb0ab3037db92c340cf839268/functional_stateless_tests_(release).html                     │
│ 2020-11-23 17:17:58 │ 01415_sticking_mutations │ FAIL        │ https://clickhouse-test-reports.s3.yandex.net/17318/ed843e5c507f2c66b3d940fcf404a45a62fd8b6a/fast_test.html                                                │
└─────────────────────┴──────────────────────────┴─────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Copy link
Copy Markdown
Member

@alesapin alesapin left a comment

Choose a reason for hiding this comment

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

Need tiny renaming (discussed in tg), LGTM.

@qoega
Copy link
Copy Markdown
Member

qoega commented Dec 4, 2020

@alesapin
Copy link
Copy Markdown
Member

alesapin commented Dec 7, 2020

Join race seems unrelated, but requires investigation.

@alesapin alesapin merged commit 57f40e4 into master Dec 7, 2020
@alesapin alesapin deleted the merge-expressions branch December 7, 2020 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants