forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ede035
commit e96db51
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
regression-test/data/ssb_unique_sql_zstd_p0/partition_sort_node/test_partiiton_sort.out
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,24 @@ | ||
-- This file is automatically generated. You should know what you did if you want to edit this | ||
-- !select0 -- | ||
20000 | ||
|
||
-- !select1 -- | ||
7463 92 14 14 13 | ||
|
||
-- !select2 -- | ||
aquamarine blue seashell 14 | ||
|
||
-- !select3 -- | ||
aquamarine blue peru 11 | ||
lace blue spring 11 | ||
indian coral smoke 11 | ||
|
||
-- !select4 -- | ||
aquamarine blue peru 10 | ||
beige blanched thistle 10 | ||
indian coral seashell 10 | ||
bisque orange violet 10 | ||
lace blue midnight 10 | ||
beige forest white 10 | ||
blush frosted thistle 10 | ||
|
34 changes: 34 additions & 0 deletions
34
regression-test/suites/ssb_unique_sql_zstd_p0/partition_sort_node/test_partiiton_sort.groovy
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,34 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
suite("test_partition_sort") { | ||
sql "use regression_test_ssb_unique_sql_zstd_p0" | ||
qt_select0 """ select count() from part; """ | ||
qt_select1 """ select count(distinct p_name), count(distinct p_color),count(distinct rn),count(distinct rk),count(distinct dr) from ( | ||
select p_name, p_color , row_number() over(partition by p_name order by p_color) as rn,rank() over(partition by p_name order by p_color) as rk, | ||
dense_rank() over(partition by p_name order by p_color) as dr from part) as t; """ | ||
|
||
qt_select2 """ select * from ( | ||
select p_name, p_color , row_number() over(partition by p_name order by p_color) as rn from part) as t where rn=14; """ | ||
|
||
qt_select3 """ select * from ( select p_name, p_color , rank() over(partition by p_name order by p_color) as rn from part) as t where rn=11; """ | ||
|
||
qt_select4 """ select * from ( select p_name, p_color , dense_rank() over(partition by p_name order by p_color) as rn from part) as t where rn=10; """ | ||
|
||
|
||
|
||
} |