dbms: compatibility with OLAPServer: added missing attributes [#CONV-8210].

This commit is contained in:
Alexey Milovidov 2013-07-15 01:51:13 +00:00
parent 00f2cceac0
commit c0309c5a67

View File

@ -23,7 +23,7 @@ namespace DB
namespace OLAP
{
typedef Poco::Int64 BinaryData;
typedef Int64 BinaryData;
/** Информация о типе атрибута */
struct IAttributeMetadata
@ -93,7 +93,7 @@ struct AttributeFixedPointBase : public AttributeUIntBase<T>
/** Базовые классы для атрибутов, получаемых из времени (unix timestamp, 4 байта) */
struct AttributeDateTimeBase : public AttributeIntBase<Poco::Int32>
struct AttributeDateTimeBase : public AttributeIntBase<Int32>
{
BinaryData parse(const std::string & s) const
{
@ -111,7 +111,7 @@ struct AttributeDateTimeBase : public AttributeIntBase<Poco::Int32>
};
struct AttributeDateBase : public AttributeIntBase<Poco::Int32>
struct AttributeDateBase : public AttributeIntBase<Int32>
{
BinaryData parse(const std::string & s) const
{
@ -129,7 +129,7 @@ struct AttributeDateBase : public AttributeIntBase<Poco::Int32>
};
struct AttributeTimeBase : public AttributeIntBase<Poco::Int32>
struct AttributeTimeBase : public AttributeIntBase<Int32>
{
BinaryData parse(const std::string & s) const
{
@ -390,7 +390,7 @@ struct RegionCountry : public AttributeUIntBase<UInt32>
};
struct TraficSourceID : public AttributeIntBase<Poco::Int8>
struct TraficSourceID : public AttributeIntBase<Int8>
{
};
@ -716,7 +716,7 @@ struct IPNetworkID : public AttributeUIntBase<UInt32>
};
struct ClientTimeZone : public AttributeIntBase<Poco::Int16>
struct ClientTimeZone : public AttributeIntBase<Int16>
{
};
@ -924,35 +924,35 @@ struct UserAgentID : public AttributeInOneFileBase
};
struct ClickGoodEvent : public AttributeIntBase<Poco::Int8>
struct ClickGoodEvent : public AttributeIntBase<Int8>
{
};
struct ClickPriorityID : public AttributeIntBase<Poco::Int32>
struct ClickPriorityID : public AttributeIntBase<Int32>
{
};
struct ClickBannerID : public AttributeIntBase<Poco::Int32>
struct ClickBannerID : public AttributeIntBase<Int32>
{
};
struct ClickPhraseID : public AttributeIntBase<Poco::Int32>
struct ClickPhraseID : public AttributeIntBase<Int32>
{
};
struct ClickPageID : public AttributeIntBase<Poco::Int32>
struct ClickPageID : public AttributeIntBase<Int32>
{
};
struct ClickPlaceID : public AttributeIntBase<Poco::Int32>
struct ClickPlaceID : public AttributeIntBase<Int32>
{
};
struct ClickTypeID : public AttributeIntBase<Poco::Int32>
struct ClickTypeID : public AttributeIntBase<Int32>
{
};
struct ClickResourceID : public AttributeIntBase<Poco::Int32>
struct ClickResourceID : public AttributeIntBase<Int32>
{
};
@ -976,27 +976,27 @@ struct ClickTargetPhraseID : public AttributeUIntBase<UInt64>
{
};
struct GoalReachesAny : public AttributeUIntBase<Poco::Int16>
struct GoalReachesAny : public AttributeUIntBase<Int16>
{
};
struct GoalReachesDepth : public AttributeUIntBase<Poco::Int16>
struct GoalReachesDepth : public AttributeUIntBase<Int16>
{
};
struct GoalReachesURL : public AttributeUIntBase<Poco::Int16>
struct GoalReachesURL : public AttributeUIntBase<Int16>
{
};
struct ConvertedAny : public AttributeFixedPointBase<Poco::Int16>
struct ConvertedAny : public AttributeFixedPointBase<Int16>
{
};
struct ConvertedDepth : public AttributeFixedPointBase<Poco::Int16>
struct ConvertedDepth : public AttributeFixedPointBase<Int16>
{
};
struct ConvertedURL : public AttributeFixedPointBase<Poco::Int16>
struct ConvertedURL : public AttributeFixedPointBase<Int16>
{
};
@ -1153,6 +1153,39 @@ struct CLID : public AttributeUIntBase<UInt32>
{
};
struct SocialSourceNetworkID : public AttributeUIntBase<UInt8>
{
};
struct URLCategoryID : public AttributeUIntBase<UInt16>
{
};
struct URLCategoryMostAncestor : public AttributeUIntBase<UInt16>
{
};
struct URLCategorySecondLevel : public AttributeUIntBase<UInt16>
{
};
struct URLRegionID : public AttributeUIntBase<UInt32>
{
};
struct URLRegionCity : public AttributeUIntBase<UInt32>
{
};
struct URLRegionArea : public AttributeUIntBase<UInt32>
{
};
struct URLRegionCountry : public AttributeUIntBase<UInt32>
{
};
/** Информация о типах атрибутов */
typedef std::map<std::string, Poco::SharedPtr<IAttributeMetadata> > AttributeMetadatas;
@ -1330,6 +1363,16 @@ inline AttributeMetadatas GetOLAPAttributeMetadata()
metadata["FromHash"] = new FromHash;
metadata["CLID"] = new CLID;
metadata["SocialSourceNetworkID"] = new SocialSourceNetworkID;
metadata["URLCategoryID"] = new URLCategoryID;
metadata["URLCategoryMostAncestor"]= new URLCategoryMostAncestor;
metadata["URLCategorySecondLevel"] = new URLCategorySecondLevel;
metadata["URLRegionID"] = new URLRegionID;
metadata["URLRegionCity"] = new URLRegionCity;
metadata["URLRegionArea"] = new URLRegionArea;
metadata["URLRegionCountry"] = new URLRegionCountry;
return metadata;
}