> Throw StackOverflowError exception using MV datamap
> ---------------------------------------------------
>
> Key: CARBONDATA-3238
> URL:
https://issues.apache.org/jira/browse/CARBONDATA-3238> Project: CarbonData
> Issue Type: Bug
> Components: data-query
> Affects Versions: 1.5.1
> Reporter: Chenjian Qiu
> Priority: Blocker
> Fix For: 1.5.2
>
> Time Spent: 4h 50m
> Remaining Estimate: 0h
>
> Exception:
> java.lang.StackOverflowError
> at org.apache.spark.sql.catalyst.expressions.AttributeMap$$anonfun$get$1.apply(AttributeMap.scala:34)
> at org.apache.spark.sql.catalyst.expressions.AttributeMap$$anonfun$get$1.apply(AttributeMap.scala:34)
> at scala.Option.map(Option.scala:146)
> at org.apache.spark.sql.catalyst.expressions.AttributeMap.get(AttributeMap.scala:34)
> at org.apache.spark.sql.catalyst.expressions.AttributeMap.contains(AttributeMap.scala:36)
> TestCase:
> sql("drop datamap if exists all_table_mv")
> sql("drop table if exists all_table")
> sql("create table all_table(x1 bigint,x2 bigint,x3 string,x4 bigint,x5 bigint,x6 int,x7 string,x8 int, x9 int,x10 bigint," +
> "x11 bigint, x12 bigint,x13 bigint,x14 bigint,x15 bigint,x16 bigint,x17 bigint,x18 bigint,x19 bigint) stored by 'carbondata'")
> sql("insert into all_table select 1,1,null,1,1,1,null,1,1,1,1,1,1,1,1,1,1,1,1")
> sql("create datamap all_table_mv on table all_table using 'mv' " +
> "as select sum(x12) as y1, sum(x13) as y2, sum(x14) as y3,sum(x15) as y4,X8,x9,x2 from all_table group by X8,x9,x2")
> sql("rebuild datamap all_table_mv")
> sql("explain select sum(x12) as y1, sum(x13) as y2, sum(x14) as y3,sum(x15) as y4,X8,x9,x2 from all_table group by X8,x9,x2")