-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 #25394 from ClickHouse/function-bit-position-to-ar…
…ray-merge Merging #23843
- Loading branch information
Showing
5 changed files
with
261 additions
and
2 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
44 changes: 44 additions & 0 deletions
44
tests/queries/0_stateless/01866_bit_positions_to_array.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,44 @@ | ||
Int8 | ||
0 [] | ||
1 [0] | ||
-1 [0,1,2,3,4,5,6,7] | ||
127 [0,1,2,3,4,5,6] | ||
-128 [7] | ||
Int16 | ||
0 [] | ||
1 [0] | ||
-1 [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] | ||
32765 [0,2,3,4,5,6,7,8,9,10,11,12,13,14] | ||
-32768 [15] | ||
Int32 | ||
0 [] | ||
1 [0] | ||
Int64 | ||
0 [] | ||
1 [0] | ||
Int128 | ||
0 [] | ||
1 [0] | ||
Int256 | ||
0 [] | ||
1 [0] | ||
UInt8 | ||
0 [] | ||
1 [0] | ||
128 [7] | ||
UInt16 | ||
0 [] | ||
1 [0] | ||
UInt32 | ||
0 [] | ||
1 [0] | ||
UInt64 | ||
0 [] | ||
1 [0] | ||
UInt128 | ||
0 [] | ||
1 [0] | ||
340282366920938463463374607431768211455 [0] | ||
UInt256 | ||
0 [] | ||
1 [0] |
55 changes: 55 additions & 0 deletions
55
tests/queries/0_stateless/01866_bit_positions_to_array.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,55 @@ | ||
SELECT 'Int8'; | ||
SELECT toInt8(0), bitPositionsToArray(toInt8(0)); | ||
SELECT toInt8(1), bitPositionsToArray(toInt8(1)); | ||
SELECT toInt8(-1), bitPositionsToArray(toInt8(-1)); | ||
SELECT toInt8(127), bitPositionsToArray(toInt8(127)); | ||
SELECT toInt8(128), bitPositionsToArray(toInt8(128)); | ||
|
||
SELECT 'Int16'; | ||
SELECT toInt16(0), bitPositionsToArray(toInt16(0)); | ||
SELECT toInt16(1), bitPositionsToArray(toInt16(1)); | ||
SELECT toInt16(-1), bitPositionsToArray(toInt16(-1)); | ||
select toInt16(32765), bitPositionsToArray(toInt16(32765)); | ||
select toInt16(32768), bitPositionsToArray(toInt16(32768)); | ||
|
||
SELECT 'Int32'; | ||
SELECT toInt32(0), bitPositionsToArray(toInt32(0)); | ||
SELECT toInt32(1), bitPositionsToArray(toInt32(1)); | ||
|
||
SELECT 'Int64'; | ||
SELECT toInt64(0), bitPositionsToArray(toInt64(0)); | ||
SELECT toInt64(1), bitPositionsToArray(toInt64(1)); | ||
|
||
SELECT 'Int128'; | ||
SELECT toInt128(0), bitPositionsToArray(toInt128(0)); | ||
SELECT toInt128(1), bitPositionsToArray(toInt128(1)); | ||
|
||
SELECT 'Int256'; | ||
SELECT toInt256(0), bitPositionsToArray(toInt256(0)); | ||
SELECT toInt256(1), bitPositionsToArray(toInt256(1)); | ||
|
||
SELECT 'UInt8'; | ||
SELECT toUInt8(0), bitPositionsToArray(toUInt8(0)); | ||
SELECT toUInt8(1), bitPositionsToArray(toUInt8(1)); | ||
SELECT toUInt8(128), bitPositionsToArray(toUInt8(128)); | ||
|
||
SELECT 'UInt16'; | ||
SELECT toUInt16(0), bitPositionsToArray(toUInt16(0)); | ||
SELECT toUInt16(1), bitPositionsToArray(toUInt16(1)); | ||
|
||
SELECT 'UInt32'; | ||
SELECT toUInt32(0), bitPositionsToArray(toUInt32(0)); | ||
SELECT toUInt32(1), bitPositionsToArray(toUInt32(1)); | ||
|
||
SELECT 'UInt64'; | ||
SELECT toUInt64(0), bitPositionsToArray(toUInt64(0)); | ||
SELECT toUInt64(1), bitPositionsToArray(toUInt64(1)); | ||
|
||
SELECT 'UInt128'; | ||
SELECT toUInt128(0), bitPositionsToArray(toUInt128(0)); | ||
SELECT toUInt128(1), bitPositionsToArray(toUInt128(1)); | ||
SELECT toUInt128(-1), bitPositionsToArray(toUInt128(1)); | ||
|
||
SELECT 'UInt256'; | ||
SELECT toUInt256(0), bitPositionsToArray(toUInt256(0)); | ||
SELECT toUInt256(1), bitPositionsToArray(toUInt256(1)); |