From 32160724927a9d1706a9c504225ee7b773c1a616 Mon Sep 17 00:00:00 2001 From: Evgeniy Gatov Date: Thu, 29 Aug 2013 17:54:37 +0000 Subject: [PATCH] =?UTF-8?q?dbms/Server,=20programs/=E2=96=88=E2=96=88?= =?UTF-8?q?=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88?= =?UTF-8?q?=E2=96=88=E2=96=88,=20=E2=96=88=E2=96=88=E2=96=88=E2=96=88?= =?UTF-8?q?=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88?= =?UTF-8?q?:=20added=20CorrectedTraficSourceID,=20CorrectedSerachEngineID?= =?UTF-8?q?=20[#CONV-7968].?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbms/src/Server/OLAPAttributesMetadata.h | 5 +++++ dbms/src/Server/OLAPQueryConverter.cpp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/dbms/src/Server/OLAPAttributesMetadata.h b/dbms/src/Server/OLAPAttributesMetadata.h index b2ab6988a6e..586ff7e7aca 100644 --- a/dbms/src/Server/OLAPAttributesMetadata.h +++ b/dbms/src/Server/OLAPAttributesMetadata.h @@ -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) ; } diff --git a/dbms/src/Server/OLAPQueryConverter.cpp b/dbms/src/Server/OLAPQueryConverter.cpp index 119bbaa4f59..d9399502258 100644 --- a/dbms/src/Server/OLAPQueryConverter.cpp +++ b/dbms/src/Server/OLAPQueryConverter.cpp @@ -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 }