#pragma once #include #include #include #include /// This is for Yandex.Metrica code. namespace DB { /// Transform anything to Field. template inline Field toField(const T & x) { return Field(typename NearestFieldType::Type(x)); } inline Field toField(const LocalDate & x) { return toField(static_cast(x.getDayNum())); } inline Field toField(const LocalDateTime & x) { return toField(static_cast(static_cast(x))); } inline Field toField(const VisitID_t & x) { return toField(static_cast(x)); } }