kangkaisen opened a new issue #5164: URL: https://github.com/apache/incubator-doris/issues/5164
**Describe the bug** ``` 2020-12-28 19:17:54,377 WARN (doris-mysql-nio-pool-1|151) [StmtExecutor.analyze():601] Analyze failed because java.lang.NullPointerException: null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:878) ~[spark-dpp-1.0.0.jar:?] at org.apache.doris.planner.OlapScanNode.updateColumnType(OlapScanNode.java:260) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.OlapScanNode.updateScanRangeInfoByNewMVSelector(OlapScanNode.java:231) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.SingleNodePlanner.selectMaterializedView(SingleNodePlanner.java:796) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.SingleNodePlanner.selectMaterializedView(SingleNodePlanner.java:767) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.SingleNodePlanner.selectMaterializedView(SingleNodePlanner.java:807) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.SingleNodePlanner.selectMaterializedView(SingleNodePlanner.java:767) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.Planner.createPlanFragments(Planner.java:167) ~[dorisdb-fe.jar:?] at org.apache.doris.planner.Planner.plan(Planner.java:81) ~[dorisdb-fe.jar:?] ``` **To Reproduce** ``` create table sales_records(record_id int, seller_id int, store_id int, sale_date date, sale_amt bigint) distributed by hash(record_id) properties("replication_num" = "1"); create materialized view store_id as select store_id from sales_records; insert into sales_records(record_id, seller_id, store_id, sale_date, sale_amt) values(1, 1, 1, '2020-12-30',1); with t as ( SELECT store_id as id , 'kks' as aaa, sum(seller_id) as seller, sum(sale_amt) as a FROM sales_records GROUP BY store_id ) select id, t1 from( select id, a as t1 from t union all select id, aaa as t1 from t ) k2; ``` ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org