Babulal created CARBONDATA-2046:
-----------------------------------

             Summary: agg Query failed when non supported aggregate is present 
in Query
                 Key: CARBONDATA-2046
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2046
             Project: CarbonData
          Issue Type: Bug
            Reporter: Babulal


Run below Query where var_samp is not supported aggregate for aggregate table

spark.sql(
 s"""create datamap preagg_sum on table tbl_1 using 'preaggregate' as select 
mac,avg(age) from tbl_1 group by mac"""

 .stripMargin)

spark.sql("select var_samp(mac) from tbl_1 where mac='Mikaa1' ").explain()


Exception :-
Exception in thread "main" org.apache.spark.sql.AnalysisException: resolved 
attribute(s) mac#2 missing from 
tbl_1_mac#56,tbl_1_age_sum#57L,tbl_1_age_count#58L in operator !Aggregate 
[var_samp(cast(mac#2 as double)) AS var_samp(CAST(mac AS DOUBLE))#59];;
!Aggregate [var_samp(cast(mac#2 as double)) AS var_samp(CAST(mac AS DOUBLE))#59]
+- Filter (tbl_1_mac#56 = Mikaa1)
   +- Relation[tbl_1_mac#56,tbl_1_age_sum#57L,tbl_1_age_count#58L] 
CarbonDatasourceHadoopRelation [ Database name :default, Table name 
:tbl_1_preagg_sum, Schema 
:Some(StructType(StructField(tbl_1_mac,StringType,true), 
StructField(tbl_1_age_sum,LongType,true), 
StructField(tbl_1_age_count,LongType,true))) ]





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to