Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Jul 8, 2024
1 parent ad9c454 commit 177e8dc
Show file tree
Hide file tree
Showing 45 changed files with 2,942 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query{--}") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query1") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query24") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query64") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query67") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query72") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("query78") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q10") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q11") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q12") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q13") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q14") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q15") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q17") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ suite("q19") {

sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ suite("q3") {
// db = "tpch"
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q4") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q5") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q7") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q8") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ suite("q9") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=false'
sql 'set enable_fallback_to_original_planner=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
sql 'set runtime_filter_mode=OFF'
Expand Down
26 changes: 26 additions & 0 deletions regression-test/suites/new_shapes_p0/hint_tpcds/ddl/gen_shape.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# // 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.
if __name__ == '__main__':
with open('shape.tmpl', 'r') as f:
tmpl = f.read()
for i in range(1,100):
with open('../../../../tools/tpcds-tools/queries/sf1000/query'+str(i)+'.sql', 'r') as fi:
casei = tmpl.replace('{--}', str(i))
casei = casei.replace('{query}', fi.read().split(";")[0])

with open('../shape/query'+str(i)+'.groovy', 'w') as out:
out.write(casei)
40 changes: 40 additions & 0 deletions regression-test/suites/new_shapes_p0/hint_tpcds/ddl/shape.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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("query{--}") {
String db = context.config.getDbNameByFile(new File(context.file.parent))
sql "use ${db}"
sql 'set enable_nereids_planner=true'
sql 'set enable_nereids_distribute_planner=true'
sql 'set enable_fallback_to_original_planner=false'
sql 'set exec_mem_limit=21G'
sql 'set be_number_for_test=3'
sql 'set parallel_fragment_exec_instance_num=8; '
sql 'set parallel_pipeline_task_num=8; '
sql 'set forbid_unknown_col_stats=true'
sql 'set enable_nereids_timeout = false'
sql 'set enable_runtime_filter_prune=false'
sql 'set runtime_filter_type=8'
sql 'set dump_nereids_memo=false'
def ds = """{query}"""
qt_ds_shape_{--} '''
explain shape plan
{query}
'''
}
Loading

0 comments on commit 177e8dc

Please sign in to comment.