Yang, it's very clear, got you;

2016-10-28 14:58 GMT+08:00 Li Yang <[email protected]>:

> Hi Kylin developers
>
> Want to get your attention of the recent redesign of TblColRef on master
> branch.
>
> As a prerequisite of snowflake support, I'm working on KYLIN-1971 recently.
> The goal is to support a table appearing more than once in a model, e.g.
> the COUNTRY lookup table may join the SALES fact table twice in a model,
> once as the BUYER COUNTRY and a second time as the SELLER COUNTRY. Such use
> case is not rare in real models.
>
> In order to support such usage, a few redesign is made.
>
> Firstly, an ALIAS is attached to every table in data model. So the COUNTRY
> table can appear twice in the model, once as alias BUYER_COUNTRY and a
> second time as SELLER_COUNTRY. In all places of model/cube definition,
> ALIAS.COLUMN is used to refer to columns. If the alias is omitted, the
> column will be searched in all tables, such that existing model/cube does
> not have to change. The metadata is backward compatible.
>
> Secondly, a new class TableRef is introduced and the existing TblColRef is
> redesigned. A TableRef is a Table bound to a model using an ALIAS;
> similarly a TblColRef is a Column bound to a model through a reference to
> TableRef.
>
> Lastly, all usages of TblColRef are revised according to above design. For
> places where needs a model related column, please use TblColRef; for places
> where needs a pure table column, please use ColumnDesc.
>
> New code shall follow the design too.
>
> Cheers
> Yang
>



-- 
Best regards,

Shaofeng Shi 史少锋

Reply via email to