[
https://issues.apache.org/jira/browse/CARBONDATA-2046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ravindra Pesala resolved CARBONDATA-2046.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0
> 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
> Assignee: Babulal
> Priority: Major
> Fix For: 1.3.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> 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)