dbms/Server, programs/███████████, ███████████: added CorrectedTraficSourceID, CorrectedSerachEngineID [#CONV-7968].

This commit is contained in:
Evgeniy Gatov 2013-08-29 17:54:37 +00:00
parent fc7a15a01d
commit 3216072492
2 changed files with 9 additions and 0 deletions

View File

@ -204,6 +204,9 @@ typedef AttributeUIntBase RegionCity;
typedef AttributeUIntBase RegionArea;
typedef AttributeUIntBase RegionCountry;
typedef AttributeIntBase TraficSourceID;
typedef AttributeIntBase CorrectedTraficSourceID;
typedef AttributeUIntBase CorrectedSearchEngineID;
typedef AttributeUIntBase IsNewUser;
typedef AttributeUIntBase UserNewness;
@ -799,6 +802,8 @@ inline AttributeMetadatas GetOLAPAttributeMetadata()
("URLRegionCity", new URLRegionCity)
("URLRegionArea", new URLRegionArea)
("URLRegionCountry", new URLRegionCountry)
("CorrectedTraficSourceID", new CorrectedTraficSourceID)
("CorrectedSearchEngineID", new CorrectedSearchEngineID)
;
}

View File

@ -547,6 +547,10 @@ void QueryConverter::fillNumericAttributeMap()
M("CLID", "CLID")
M("SocialSourceNetworkID","SocialSourceNetworkID")
/// где 26 это Яндекс (db_dumps/SearchEngines).
M("CorrectedTraficSourceID", "(IsYandex AND SEIn(toUInt8(SearchEngineID), 26)) ? -1 : TraficSourceID")
M("CorrectedSearchEngineID", "(IsYandex AND SEIn(toUInt8(SearchEngineID), 26)) ? 0 : toUInt8(SearchEngineID)")
#undef M
}