-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
area/plannerIssues or PRs related to the query plannerIssues or PRs related to the query plannerkind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Describe the bug
Situation: Select a constant column from inline view which includes at least one regular column.
Query failed!
MySQL [test]> select a from (select 'c1' a , k1 from test) a;
ERROR 1064 (HY000): errCode = 2, detailMessage = failed to build storage scanner, no materialized slot!
To Reproduce
Steps to reproduce the behavior:
- create table
CREATE TABLE `test` (
`k1` int(11) NULL COMMENT "",
`k2` bigint(20) NULL COMMENT "",
`k3` decimal(9, 0) NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`k1`, `k2`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`k1`) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT"
);
- insert values
insert into test values(2,2,2);
- query
MySQL [test]> select a from (select 'c1' a , k1 from test) a;
ERROR 1064 (HY000): errCode = 2, detailMessage = failed to build storage scanner, no materialized slot!
Expected behavior
+------+
| a |
+------+
| c1 |
+------+
If there are two lines in table, the result will be:
+------+
| a |
+------+
| c1 |
| c1 |
+------+
Metadata
Metadata
Assignees
Labels
area/plannerIssues or PRs related to the query plannerIssues or PRs related to the query plannerkind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.