Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
distinct, count, Sum query fails when MV is created on single projection column
sql("drop table if exists maintable")
sql("create table maintable(name string, age int, add string) stored by 'carbondata'")
sql("create datamap single_mv using 'mv' as select age from maintable")
sql("insert into maintable select 'pheobe',31,'NY'")
sql("insert into maintable select 'rachel',32,'NY'")
sql("select distinct(age) from maintable")
sql("select sum(age) from maintable")
sql("select count(age) from maintable")
Fails with below Exception:
requirement failed: Fragment is not supported. Current frag:
org.apache.carbondata.mv.plans.util.SQLBuildDSL$$anon$1@1f7f2e76
java.lang.IllegalArgumentException: requirement failed: Fragment is not supported. Current frag:
org.apache.carbondata.mv.plans.util.SQLBuildDSL$$anon$1@1f7f2e76
at scala.Predef$.require(Predef.scala:224)
at org.apache.carbondata.mv.plans.util.Printers$SQLFragmentCompactPrinter.printFragment(Printers.scala:248)
at org.apache.carbondata.mv.plans.util.Printers$FragmentPrinter$$anonfun$print$1.apply(Printers.scala:82)
at org.apache.carbondata.mv.plans.util.Printers$FragmentPrinter$$anonfun$print$1.apply(Printers.scala:80)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
at org.apache.carbondata.mv.plans.util.Printers$FragmentPrinter.print(Printers.scala:80)
at org.apache.carbondata.mv.plans.util.Printers$class.render(Printers.scala:318)
at org.apache.carbondata.mv.plans.modular.ModularPlan.render(ModularPlan.scala:35)
at org.apache.carbondata.mv.plans.util.Printers$class.asCompactString(Printers.scala:323)
at org.apache.carbondata.mv.plans.modular.ModularPlan.asCompactString(ModularPlan.scala:35)
at org.apache.carbondata.mv.plans.modular.ModularPlan.asCompactSQL(ModularPlan.scala:156)
at org.apache.carbondata.mv.datamap.MVAnalyzerRule.apply(MVAnalyzerRule.scala:83)
at org.apache.carbondata.mv.datamap.MVAnalyzerRule.apply(MVAnalyzerRule.scala:43)
at org.apache.spark.sql.hive.CarbonAnalyzer.execute(CarbonAnalyzer.scala:46)
Attachments
Attachments
Issue Links
- links to