EmmyMiao87 opened a new issue #4716:
URL: https://github.com/apache/incubator-doris/issues/4716
**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:
1. 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"
);
```
2. insert values
```
insert into test values(2,2,2);
```
3. 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 |
+------+
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]