[tools](refactor) remove unused session variables (#21405)
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
SELECT /*+SET_VAR(parallel_fragment_exec_instance_num=4, batch_size=4096, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
SELECT
|
||||
d_year,
|
||||
c_nation,
|
||||
SUM(lo_revenue - lo_supplycost) AS PROFIT
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
SELECT /*+SET_VAR(parallel_fragment_exec_instance_num=2, batch_size=4096, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
SELECT
|
||||
d_year,
|
||||
s_nation,
|
||||
p_category,
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
SELECT /*+SET_VAR(parallel_fragment_exec_instance_num=2, batch_size=4096, enable_cost_based_join_reorder=true, enable_projection=true) */
|
||||
SELECT
|
||||
d_year,
|
||||
s_city,
|
||||
p_brand,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
l_returnflag,
|
||||
l_linestatus,
|
||||
sum(l_quantity) as sum_qty,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
c_custkey,
|
||||
c_name,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
ps_partkey,
|
||||
sum(ps_supplycost * ps_availqty) as value
|
||||
from
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
l_shipmode,
|
||||
sum(case
|
||||
when o_orderpriority = '1-URGENT'
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
c_count,
|
||||
count(*) as custdist
|
||||
from
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
100.00 * sum(case
|
||||
when p_type like 'PROMO%'
|
||||
then l_extendedprice * (1 - l_discount)
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
s_suppkey,
|
||||
s_name,
|
||||
s_address,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size,
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
-- Modified
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
sum(l_extendedprice) / 7.0 as avg_yearly
|
||||
from
|
||||
lineitem,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
c_name,
|
||||
c_custkey,
|
||||
o_orderkey,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
sum(l_extendedprice* (1 - l_discount)) as revenue
|
||||
from
|
||||
lineitem,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
s_name,
|
||||
s_address
|
||||
from
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
s_name,
|
||||
count(*) as numwait
|
||||
from
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
n_name,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue
|
||||
from
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
from
|
||||
lineitem
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
o_year,
|
||||
sum(case
|
||||
when nation = 'BRAZIL' then volume
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
select /*+SET_VAR(enable_nereids_planner=true,enable_pipeline_engine=true) */
|
||||
select
|
||||
nation,
|
||||
o_year,
|
||||
sum(amount) as sum_profit
|
||||
|
||||
Reference in New Issue
Block a user