Skip to content

Commit

Permalink
opttester: This commit removes session setting flags from OptTester.F…
Browse files Browse the repository at this point in the history
…lags

Release note: none
  • Loading branch information
Mark Sirek committed Aug 16, 2022
1 parent 7f6da23 commit 9a0c512
Show file tree
Hide file tree
Showing 35 changed files with 96 additions and 176 deletions.
50 changes: 25 additions & 25 deletions pkg/sql/opt/memo/testdata/stats_quality/tpcc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import file=tpcc_stats_w10
# reflect on-line database activity as typically found in production
# environments.
# --------------------------------------------------
stats-quality format=hide-qual database=tpcc stats-quality-prefix=new_order_01 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=new_order_01 ignore-tables=1
SELECT w_tax FROM warehouse WHERE w_id = 1
----
----
Expand Down Expand Up @@ -46,7 +46,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=new_order_02 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=new_order_02 ignore-tables=1
SELECT c_discount, c_last, c_credit
FROM customer
WHERE c_w_id = 1 AND c_d_id = 1 AND c_id = 50
Expand Down Expand Up @@ -87,7 +87,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=new_order_03
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=new_order_03
SELECT i_price, i_name, i_data
FROM item
WHERE i_id IN (125, 150, 175, 200, 25, 50, 75, 100, 225, 250, 275, 300)
Expand Down Expand Up @@ -131,7 +131,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=new_order_04 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=new_order_04 ignore-tables=1
SELECT s_quantity, s_ytd, s_order_cnt, s_remote_cnt, s_data, s_dist_05
FROM stock
WHERE (s_i_id, s_w_id) IN ((1000, 4), (900, 4), (1100, 4), (1500, 4), (1400, 4))
Expand Down Expand Up @@ -193,7 +193,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count
# stringent response time requirements to satisfy on-line users. In addition,
# this transaction includes non-primary key access to the CUSTOMER table.
# --------------------------------------------------
stats-quality format=hide-qual database=tpcc stats-quality-prefix=payment_01 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=payment_01 ignore-tables=1
SELECT c_id
FROM customer
WHERE c_w_id = 1 AND c_d_id = 1 AND c_last = 'ANTIABLEABLE'
Expand Down Expand Up @@ -248,7 +248,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
# users. In addition, this table includes non-primary key access to the
# CUSTOMER table.
# --------------------------------------------------
stats-quality format=hide-qual database=tpcc stats-quality-prefix=order_status_01 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=order_status_01 ignore-tables=1
SELECT c_balance, c_first, c_middle, c_last
FROM customer
WHERE c_w_id = 1 AND c_d_id = 1 AND c_id = 50
Expand Down Expand Up @@ -291,7 +291,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=order_status_02 ignore-tables=(1,3)
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=order_status_02 ignore-tables=(1,3)
SELECT c_id, c_balance, c_first, c_middle
FROM customer
WHERE c_w_id = 2 AND c_d_id = 2 AND c_last = 'ANTIBARESE'
Expand Down Expand Up @@ -358,7 +358,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=order_status_03 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=order_status_03 ignore-tables=1
SELECT o_id, o_entry_d, o_carrier_id
FROM "order"
WHERE o_w_id = 4 AND o_d_id = 3 AND o_c_id = 10
Expand Down Expand Up @@ -401,7 +401,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=order_status_04 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=order_status_04 ignore-tables=1
SELECT ol_i_id, ol_supply_w_id, ol_quantity, ol_amount, ol_delivery_d
FROM order_line
WHERE ol_w_id = 1 AND ol_d_id = 1 AND ol_o_id = 1000
Expand Down Expand Up @@ -463,7 +463,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_cou
# indicating transaction completion. The result of the deferred execution is
# recorded into a result file.
# --------------------------------------------------
stats-quality format=hide-qual database=tpcc stats-quality-prefix=delivery_01 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=delivery_01 ignore-tables=1
SELECT no_o_id
FROM new_order
WHERE no_w_id = 7 AND no_d_id = 6
Expand Down Expand Up @@ -500,7 +500,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=delivery_02
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=delivery_02
SELECT sum(ol_amount)
FROM order_line
WHERE ol_w_id = 8 AND ol_d_id = 6 AND ol_o_id = 1000
Expand Down Expand Up @@ -559,7 +559,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
# heavy read-only database transaction with a low frequency of execution, a
# relaxed response time requirement, and relaxed consistency requirements.
# --------------------------------------------------
stats-quality format=hide-qual database=tpcc stats-quality-prefix=stock_level_01 ignore-tables=1
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=stock_level_01 ignore-tables=1
SELECT d_next_o_id
FROM district
WHERE d_w_id = 4 AND d_id = 9
Expand Down Expand Up @@ -594,7 +594,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=stock_level_02
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=stock_level_02
SELECT count(DISTINCT s_i_id)
FROM order_line
JOIN stock
Expand Down Expand Up @@ -697,7 +697,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
# These queries run after TPCC in order to check database consistency.
# They are not part of the benchmark itself.
# --------------------------------------------------
stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_01
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_01
SELECT count(*)
FROM warehouse
FULL OUTER JOIN
Expand Down Expand Up @@ -812,7 +812,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_02
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_02
SELECT d_next_o_id
FROM district
ORDER BY d_w_id, d_id
Expand Down Expand Up @@ -845,7 +845,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_03
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_03
SELECT max(no_o_id)
FROM new_order
GROUP BY no_d_id, no_w_id
Expand Down Expand Up @@ -900,7 +900,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_04
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_04
SELECT max(o_id)
FROM "order"
GROUP BY o_d_id, o_w_id
Expand Down Expand Up @@ -955,7 +955,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_05
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_05
SELECT count(*)
FROM
(
Expand Down Expand Up @@ -1062,7 +1062,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_06
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_06
SELECT sum(o_ol_cnt)
FROM "order"
GROUP BY o_w_id, o_d_id
Expand Down Expand Up @@ -1116,7 +1116,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_07
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_07
SELECT count(*)
FROM order_line
GROUP BY ol_w_id, ol_d_id
Expand Down Expand Up @@ -1165,7 +1165,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_08
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_08
(SELECT no_w_id, no_d_id, no_o_id FROM new_order)
EXCEPT ALL
(SELECT o_w_id, o_d_id, o_id FROM "order" WHERE o_carrier_id IS NULL)
Expand Down Expand Up @@ -1280,7 +1280,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_09
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_09
(SELECT o_w_id, o_d_id, o_id FROM "order" WHERE o_carrier_id IS NULL)
EXCEPT ALL
(SELECT no_w_id, no_d_id, no_o_id FROM new_order)
Expand Down Expand Up @@ -1395,7 +1395,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_10
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_10
(
SELECT o_w_id, o_d_id, o_id, o_ol_cnt
FROM "order"
Expand Down Expand Up @@ -1508,7 +1508,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality format=hide-qual database=tpcc stats-quality-prefix=consistency_11
stats-quality format=hide-qual database=tpcc set=save_tables_prefix=consistency_11
(
SELECT ol_w_id, ol_d_id, ol_o_id, count(*)
FROM order_line
Expand Down Expand Up @@ -1621,7 +1621,7 @@ column_names row_count_est row_count_err distinct_count_est distinct_count_e
----
----

stats-quality database=tpcc stats-quality-prefix=consistency_12
stats-quality database=tpcc set=save_tables_prefix=consistency_12
SELECT count(*)
FROM
(
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q01
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import file=tpch_stats
# LINESTATUS, and listed in ascending order of RETURNFLAG and LINESTATUS. A
# count of the number of lineitems in each group is included.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q1
stats-quality database=tpch set=save_tables_prefix=q1
SELECT
l_returnflag,
l_linestatus,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q02
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import file=tpch_stats
# 1. Allow Select to be pushed below Ordinality used to add key column
# 2. Add decorrelation rule for Ordinality/RowKey
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q2
stats-quality database=tpch set=save_tables_prefix=q2
SELECT
s_acctbal,
s_name,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q03
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import file=tpch_stats
# decreasing order of revenue. If more than 10 unshipped orders exist, only the
# 10 orders with the largest revenue are listed.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q3
stats-quality database=tpch set=save_tables_prefix=q3
SELECT
l_orderkey,
sum(l_extendedprice * (1 - l_discount)) AS revenue,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q04
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import file=tpch_stats
# committed date. The query lists the count of such orders for each order
# priority sorted in ascending priority order.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q4
stats-quality database=tpch set=save_tables_prefix=q4
SELECT
o_orderpriority,
count(*) AS order_count
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q05
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import file=tpch_stats
# all qualifying lineitems in a particular nation is defined as
# sum(l_extendedprice * (1 - l_discount)).
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q5
stats-quality database=tpch set=save_tables_prefix=q5
SELECT
n_name,
sum(l_extendedprice * (1 - l_discount)) AS revenue
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q06
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import file=tpch_stats
# increase is equal to the sum of [l_extendedprice * l_discount] for all
# lineitems with discounts and quantities in the qualifying range.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q6
stats-quality database=tpch set=save_tables_prefix=q6
SELECT
sum(l_extendedprice * l_discount) AS revenue
FROM
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q07
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import file=tpch_stats
# that took place in that year. The query orders the answer by Supplier nation,
# Customer nation, and year (all ascending).
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q7
stats-quality database=tpch set=save_tables_prefix=q7
SELECT
supp_nation,
cust_nation,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q08
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import file=tpch_stats
# from the given nation. The query determines this for the years 1995 and 1996
# presented in this order.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q8
stats-quality database=tpch set=save_tables_prefix=q8
SELECT
o_year,
sum(CASE
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q09
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import file=tpch_stats
# nations in ascending alphabetical order and, for each nation, the year and
# profit in descending order by year (most recent first).
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q9
stats-quality database=tpch set=save_tables_prefix=q9
SELECT
nation,
o_year,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q10
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import file=tpch_stats
# Revenue lost is defined as sum(l_extendedprice*(1-l_discount)) for all
# qualifying lineitems.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q10
stats-quality database=tpch set=save_tables_prefix=q10
SELECT
c_custkey,
c_name,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q11
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import file=tpch_stats
# available parts. The query displays the part number and the value of those
# parts in descending order of value.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q11
stats-quality database=tpch set=save_tables_prefix=q11
SELECT
ps_partkey,
sum(ps_supplycost * ps_availqty::float) AS value
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q12
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import file=tpch_stats
# The late lineitems are partitioned into two groups, those with priority URGENT
# or HIGH, and those with a priority other than URGENT or HIGH.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q12
stats-quality database=tpch set=save_tables_prefix=q12
SELECT
l_shipmode,
sum(CASE
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q13
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import file=tpch_stats
# several special categories of orders. Special categories are identified in the
# order comment column by looking for a particular pattern.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q13
stats-quality database=tpch set=save_tables_prefix=q13
SELECT
c_count, count(*) AS custdist
FROM (
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q14
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import file=tpch_stats
# shipped in that month and gives the percentage. Revenue is defined as
# (l_extendedprice * (1-l_discount)).
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q14
stats-quality database=tpch set=save_tables_prefix=q14
SELECT
100.00 * sum(CASE
WHEN p_type LIKE 'PROMO%'
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q15
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CREATE VIEW revenue0 (supplier_no, total_revenue) AS
l_suppkey;
----

stats-quality database=tpch stats-quality-prefix=q15
stats-quality database=tpch set=save_tables_prefix=q15
SELECT
s_suppkey,
s_name,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q16
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import file=tpch_stats
# Business Bureau. Results must be presented in descending count and ascending
# brand, type, and size.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q16
stats-quality database=tpch set=save_tables_prefix=q16
SELECT
p_brand,
p_type,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q17
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import file=tpch_stats
# TODO:
# 1. Allow Select to be pushed below Ordinality used to add key column
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q17
stats-quality database=tpch set=save_tables_prefix=q17
SELECT
sum(l_extendedprice) / 7.0 AS avg_yearly
FROM
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q18
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import file=tpch_stats
# orders. The query lists the customer name, customer key, the order key, date
# and total price and the quantity for the order.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q18
stats-quality database=tpch set=save_tables_prefix=q18
SELECT
c_name,
c_custkey,
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/memo/testdata/stats_quality/tpch/q19
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import file=tpch_stats
# person. Parts are selected based on the combination of specific brands, a list
# of containers, and a range of sizes.
# --------------------------------------------------
stats-quality database=tpch stats-quality-prefix=q19
stats-quality database=tpch set=save_tables_prefix=q19
SELECT
sum(l_extendedprice* (1 - l_discount)) AS revenue
FROM
Expand Down
Loading

0 comments on commit 9a0c512

Please sign in to comment.