[ 
https://issues.apache.org/jira/browse/KYLIN-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132352#comment-15132352
 ] 

Xiaoyu Wang commented on KYLIN-1122:
------------------------------------

Hi hongbin!
In branch 2.x-staging , the custom agg function can overwrite the function 
"onlyAggrInBaseCuboid" in "MeasureType",if return true , when use this custom 
function to query, it will only query the base cuboid data!
for example:
I write a RAW custom function, and want the raw data store only in base cuboid, 
the "onlyAggrInBaseCuboid" return true.
In cube desc only config RAW measure on "col1"
when query like "select col1,col2 from fact_table" will be translate to "select 
raw(col1),col2 from fact_table", and the query engine will route to extract the 
base cuboid data.
the column col2 which does not config RAW measure will return null value!
so the sql "select col1,col2 from fact_table" will return :
{noformat}
col1 col2
v1  null
v2  null
v3  null
{noformat}
and the II test case will fail!

> Kylin support detail data query from fact table
> -----------------------------------------------
>
>                 Key: KYLIN-1122
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1122
>             Project: Kylin
>          Issue Type: New Feature
>          Components: Query Engine
>    Affects Versions: v1.2
>            Reporter: Xiaoyu Wang
>            Assignee: liyang
>             Fix For: v2.0, v1.3
>
>         Attachments: 
> 0001-KYLIN-1122-Kylin-support-detail-data-query-from-fact(2.x-staging).patch, 
> 0001-KYLIN-1122-Kylin-support-detail-data-query-from-fact(update-v2-1.x-staging).patch,
>  
> 0001-KYLIN-1122-Kylin-support-detail-data-query-from-fact-new-impl-under-refactoring-2.x-staging.patch
>
>
> Now Kylin does not support query correct detail rows from fact table like:
> select column1,column2,column3 from fact_table
> The jira KYLIN-1075 add the "SUM" function on the measure column if defined.
> But only the column number type is support.
> I change some code to support this issue:
> Add a "VALUE" measure function : the same value and datatype in the input and 
> output of this function.
> If you want to query detail data from fact table
> *require*:
> 1.Configure the column which not dimensions to "VALUE" or "SUM" measure.(If 
> not configure measure function in the column will get NULL value)
> 2.The source table must has an unique value column and configure it as 
> dimension.
> If you have the better solution please comment here.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to