[MCOL-3489] Four DBT3 queries returned syntax errors Created: 2019-09-07  Updated: 2019-12-06  Resolved: 2019-12-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.4.0
Fix Version/s: 1.4.2

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MCOL-3593 Avoid MDB's optimizer to solve 'Circu... Closed

 Description   

Build tested: 1.4.0-1

[dlee@master centos7]$ cat gitversionInfo.txt
server commit:
67452bc
engine commit:
4d2a159

Autopilot test case: performance.dbt3

Tested using a 10g database

Query #7,
ERROR 1815 (HY000) at line 7: Internal error: IDB-1000: 'sub-query' and 'customer, lineitem, n1, n2, orders, supplier' are not joined.

Query #8

ERROR 1815 (HY000) at line 6: Internal error: IDB-1000: 'sub-query' and 'customer, lineitem, n1, n2, orders, part, region, supplier' are not joined

Query #9

ERROR 1815 (HY000) at line 6: Internal error: IDB-1003: Circular joins are not supported.

Query #18

ERROR 1815 (HY000): Internal error: IDB-2004: Cannot connect to ExeMgr.
Note: ExeMgr did not crash

Query #7

select
supp_nation,
cust_nation,
l_year,
sum(volume) as revenue
from
(
select
n1.n_name as supp_nation,
n2.n_name as cust_nation,
year(l_shipdate) as l_year,
l_extendedprice * (1 - l_discount) as volume
from
supplier,
lineitem,
orders,
customer,
nation n1,
nation n2
where
s_suppkey = l_suppkey
and o_orderkey = l_orderkey
and c_custkey = o_custkey
and s_nationkey = n1.n_nationkey
and c_nationkey = n2.n_nationkey
and (
(n1.n_name = 'PERU' and n2.n_name = 'MOZAMBIQUE')
or (n1.n_name = 'MOZAMBIQUE' and n2.n_name = 'PERU')
)
and l_shipdate between date('1995-01-01') and date('1996-12-31')
) as shipping
group by
supp_nation,
cust_nation,
l_year
order by
supp_nation,
cust_nation,
l_year

Query # 8

select
o_year,
sum(case
when nation = 'BRAZIL' then volume
else 0
end) / sum(volume) as mkt_share
from
(
select
year(o_orderdate) as o_year,
l_extendedprice * (1 - l_discount) as volume,
n2.n_name as nation
from
part,
supplier,
lineitem,
orders,
customer,
nation n1,
nation n2,
region
where
p_partkey = l_partkey
and s_suppkey = l_suppkey
and l_orderkey = o_orderkey
and o_custkey = c_custkey
and c_nationkey = n1.n_nationkey
and n1.n_regionkey = r_regionkey
and r_name = 'AMERICA'
and s_nationkey = n2.n_nationkey
and o_orderdate between date('1995-01-01') and date ('1996-12-31')
and p_type = 'MEDIUM BRUSHED NICKEL'
) as all_nations
group by
o_year
order by
o_year

Query #9

select
nation,
o_year,
sum(amount) as sum_profit
from
(
select
n_name as nation,
year(o_orderdate) as o_year,
l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount
from
part,
supplier,
lineitem,
partsupp,
orders,
nation
where
s_suppkey = l_suppkey
and ps_suppkey = l_suppkey
and ps_partkey = l_partkey
and p_partkey = l_partkey
and o_orderkey = l_orderkey
and s_nationkey = n_nationkey
and p_name like '%blanched%'
) as profit
group by
nation,
o_year
order by
nation,
o_year desc

Query #18

select
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice,
sum(l_quantity)
from
customer,
orders,
lineitem
where
o_orderkey in (
select
l_orderkey
from
lineitem
group by
l_orderkey having
sum(l_quantity) > 313
)
and c_custkey = o_custkey
and o_orderkey = l_orderkey
group by
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice
order by
o_totalprice desc,
o_orderdate
LIMIT 100



 Comments   
Comment by Daniel Lee (Inactive) [ 2019-09-17 ]

Query #16 was executed successfully, but return an empty set. The query also needs to be investigated.

Comment by Daniel Lee (Inactive) [ 2019-12-06 ]

Build verified: 1.4.2-1 source

Server

commit 6e1a53f89ee8d4eb9e66257b01898995aa7691de
Author: Sergei Golubchik <serg@mariadb.org>
Date: Mon Dec 2 18:07:11 2019 +0100

MENT-240 change plugin-maturity default to stable

Engine

commit 1d2ea3ad1f2a3a4eed3b220da1ca6082b2cff28f
Merge: 1d6abbe 83ef73a
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Fri Dec 6 17:34:56 2019 +0000

Merge pull request #972 from benthompson15/update-gitignore

Generated at Thu Feb 08 02:43:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.