Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !q46 --
-- !order_ds46 --
Bunker Hill 133136 4983.83 -11549.37
Plainview 1459 0.00 -3836.32
Red Hill 93581 258.51 -4603.87
Expand Down
75 changes: 75 additions & 0 deletions regression-test/suites/tpcds_sf1_unique_p1/query46.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// 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("tpcds_sf1_unique_p1_q46") {
def stats = sql "show column stats store_sales"
logger.info("${stats}")
stats = sql "show column stats date_dim"
logger.info("${stats}")
stats = sql "show column stats store"
logger.info("${stats}")
stats = sql "show column stats household_demographics"
logger.info("${stats}")
stats = sql "show column stats customer_address"
logger.info("${stats}")
ds46 = """
SELECT
c_last_name
, c_first_name
, ca_city
, bought_city
, ss_ticket_number
, amt
, profit
FROM
(
SELECT
ss_ticket_number
, ss_customer_sk
, ca_city bought_city
, sum(ss_coupon_amt) amt
, sum(ss_net_profit) profit
FROM
store_sales
, date_dim
, store
, household_demographics
, customer_address
WHERE (store_sales.ss_sold_date_sk = date_dim.d_date_sk)
AND (store_sales.ss_store_sk = store.s_store_sk)
AND (store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)
AND (store_sales.ss_addr_sk = customer_address.ca_address_sk)
AND ((household_demographics.hd_dep_count = 4)
OR (household_demographics.hd_vehicle_count = 3))
AND (date_dim.d_dow IN (6 , 0))
AND (date_dim.d_year IN (1999 , (1999 + 1) , (1999 + 2)))
AND (store.s_city IN ('Fairview' , 'Midway' , 'Fairview' , 'Fairview' , 'Fairview'))
GROUP BY ss_ticket_number, ss_customer_sk, ss_addr_sk, ca_city
) dn
, customer
, customer_address current_addr
WHERE (ss_customer_sk = c_customer_sk)
AND (customer.c_current_addr_sk = current_addr.ca_address_sk)
AND (current_addr.ca_city <> bought_city)
ORDER BY c_last_name ASC, c_first_name ASC, ca_city ASC, bought_city ASC, ss_ticket_number ASC
LIMIT 100
"""

def memo46 = sql "explain memo plan ${ds46}"
logger.info("${memo46}")
qt_order_ds46 "${ds46}"
}
40 changes: 0 additions & 40 deletions regression-test/suites/tpcds_sf1_unique_p1/sql/q46.sql

This file was deleted.