[MCOL-3422] "The storage engine for the table doesn't support IDB-3009: Unknown column" for complex query with subquery and window functions in infinidb_vtable_mode = 0; Created: 2019-08-12  Updated: 2021-02-25  Resolved: 2021-02-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 1.2.3, 1.2.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: infinidb_vtable_mode


 Description   

With the following Columnstore table:

MariaDB [test]> show create table tc\G
*************************** 1. row ***************************
       Table: tc
Create Table: CREATE TABLE `tc` (
  `id` int(11) NOT NULL,
  `cid` int(11) DEFAULT NULL,
  `d` datetime DEFAULT NULL,
  `c` decimal(12,4) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1
1 row in set (0,000 sec)
 
MariaDB [test]> select count(*) from tc;
+----------+
| count(*) |
+----------+
|   131072 |
+----------+
1 row in set (0,029 sec)

this query works in default infinidb_vtable_mode = 1; and in infinidb_vtable_mode = 2:

MariaDB [test]> set infinidb_vtable_mode = 1;
Query OK, 0 rows affected (0,000 sec)
 
MariaDB [test]> select cust, week_d, mpp_sum , stddev(mpp_sum) over (partition by cust) as mpp_stdev , avg(mpp_sum) over (partition by cust) as mpp_mean , sum(mpp_sum) over (partition by cust) as glob_mpp_sum,  count(mpp_sum) over (partition by cust) as glob_mpp_count  from  (select distinct cid as cust,  week(d) as week_d , sum(c) over (partition by cid, week(d)) as mpp_sum  from tc  where year(d) = '2018') as inside;
...
|  100 |     16 |  392103.7000 | 21.62676616 | 31.73315079 |    1650.1238 |             52 |
+------+--------+--------------+-------------+-------------+--------------+----------------+
5252 rows in set (0,718 sec)

But fails with strange error in infinidb_vtable_mode = 0;

MariaDB [test]> set infinidb_vtable_mode = 0;
Query OK, 0 rows affected (0,000 sec)
 
MariaDB [test]> select cust, week_d, mpp_sum , stddev(mpp_sum) over (partition by cust) as mpp_stdev , avg(mpp_sum) over (partition by cust) as mpp_mean , sum(mpp_sum) over (partition by cust) as glob_mpp_sum,  count(mpp_sum) over (partition by cust) as glob_mpp_count  from  (select distinct cid as cust,  week(d) as week_d , sum(c) over (partition by cid, week(d)) as mpp_sum  from tc  where year(d) = '2018') as inside;
ERROR 1178 (42000): The storage engine for the table doesn't support IDB-3009: Unknown column '..week_d'.

I think this is a bug.



 Comments   
Comment by Todd Stoffel (Inactive) [ 2021-02-25 ]

Obsolete

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