Angad Singh created LENS-444:
--------------------------------
Summary: cube.fact.is.aggregated not properly documented
Key: LENS-444
URL: https://issues.apache.org/jira/browse/LENS-444
Project: Apache Lens
Issue Type: Bug
Reporter: Angad Singh
Consider a measure in a cube:
{noformat}
<measure name="revenue" type="DOUBLE" default_aggr="SUM"/>
{noformat}
Consider that a fact table F is supplying data to this cube, which has the
column "revenue"
We run a query:
{noformat}
lens-shell>query execute cube select userid, count(revenue) from user_activity
where time_range_in(dt, '2014-06-25-00', '2014-06-26-00')
Launching query failed cause:No driver accepted the query, because No candidate
fact table available to answer the query, because {"brief":"Columns:
[[hive_fact_user_curation_good_traffic]] are missing default
aggregate","details":{"user_attributestore_er_fact_adgroup_view,user_attributestore_er_fact_supply_site_burn,user_attributestore_er_fact_demandcategory_click,user_attributestore_er_fact_supplycategory_visits,user_attributestore_er_fact_supply_site_impressions_rendered,user_attributestore_er_fact_adgroup_click,user_attributestore_er_fact_adgroup_impression_time_install,user_attributestore_er_fact_app_impression_time_install,user_attributestore_er_fact_supply_site_impressions_served,user_attributestore_er_fact_adgroup_burn,user_attributestore_er_fact_app_visits,user_attributestore_er_fact_app_click,user_attributestore_er_fact_supply_site_click,user_attributestore_er_fact_adgroup_impressions_rendered":[{"cause":"COLUMN_NOT_FOUND","missingColumns":["totalburn"]}],"hive_fact_user_curation_good_traffic":[{"cause":"MISSING_DEFAULT_AGGREGATE","columnsMissingDefaultAggregate":["hive_fact_user_curation_good_traffic"]}]}}
{noformat}
Lens complains the that the "columnsMissingDefaultAggregate". This happens
because we are querying for "count" when the default_aggr defined for the
measure in the cube is SUM. It runs fine if the query is for sum(revenue).
This is then fixed by setting the property "cube.fact.is.aggregated" = false on
the fact table F.
IMO this behaviour of "is aggregated fact" is not documented properly and will
leave many other users confused. Lets make it more obvious by way of having it
as part of fact schema spec or document it well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)