forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from Altinity/backports/22.8.18/44469_fix_and…
…_or_if_multiIf_on_LowCardinality_dictionary 22.8 Backport of ClickHouse#44469 Don't execute and/or/if/multiIf on LowCardinality dictionary
- Loading branch information
Showing
7 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/queries/0_stateless/02514_if_with_lazy_low_cardinality.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
5 changes: 5 additions & 0 deletions
5
tests/queries/0_stateless/02514_if_with_lazy_low_cardinality.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
create table if not exists t (`arr.key` Array(LowCardinality(String)), `arr.value` Array(LowCardinality(String))) engine = Memory; | ||
insert into t (`arr.key`, `arr.value`) values (['a'], ['b']); | ||
select if(true, if(lowerUTF8(arr.key) = 'a', 1, 2), 3) as x from t left array join arr; | ||
drop table t; | ||
|
4 changes: 4 additions & 0 deletions
4
tests/queries/0_stateless/02515_and_or_if_multiif_not_return_lc.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
UInt8 | ||
UInt8 | ||
UInt8 | ||
UInt8 |
5 changes: 5 additions & 0 deletions
5
tests/queries/0_stateless/02515_and_or_if_multiif_not_return_lc.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
select toTypeName(if(toLowCardinality(number % 2), 1, 2)) from numbers(1); | ||
select toTypeName(multiIf(toLowCardinality(number % 2), 1, 1, 2, 3)) from numbers(1); | ||
select toTypeName(toLowCardinality(number % 2) and 2) from numbers(1); | ||
select toTypeName(toLowCardinality(number % 2) or 2) from numbers(1); | ||
|