Skip to content

Commit 9647094

Browse files
committed
YQL-18303: Introduce ExtDateType data type flag
commit_hash:5f7d390b260264526d8546015d2e98e2130b67da (cherry picked from commit 3fdf248)
1 parent e871b90 commit 9647094

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

yql/essentials/public/udf/udf_data_type.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ enum EDataTypeFeatures : ui32 {
4545
TzDateType = 1u << 27,
4646
DecimalType = 1u << 28,
4747
TimeIntervalType = 1u << 29,
48+
// FIXME: Remove, when no entries in the code are left.
4849
BigDateType = 1u << 30,
50+
ExtDateType = 1u << 30,
4951
};
5052

53+
// FIXME: This static assert is vital for renaming BigDateType
54+
// flag into ExtDateType to be in sync with naming in docs.
55+
// Remove this assert, only when BigDateType flags is removed.
56+
static_assert(ExtDateType == BigDateType);
57+
5158
template <typename T>
5259
struct TDataType;
5360

@@ -200,13 +207,13 @@ constexpr i32 MAX_YEAR32 = 148108; // non-inclusive
200207
XX(Decimal, NYql::NProto::Decimal, TDecimal, CommonType | DecimalType, TDecimal, 2) \
201208
XX(DyNumber, NYql::NProto::DyNumber, TDyNumber, CommonType, TDyNumber, 0) \
202209
XX(JsonDocument, NYql::NProto::JsonDocument, TJsonDocument, PayloadType, TJsonDocument, 0) \
203-
XX(Date32, NYql::NProto::Date32, TDate32, CommonType | DateType | BigDateType, i32, 0) \
204-
XX(Datetime64, NYql::NProto::Datetime64, TDatetime64, CommonType | DateType | BigDateType, i64, 0) \
205-
XX(Timestamp64, NYql::NProto::Timestamp64, TTimestamp64, CommonType | DateType | BigDateType, i64, 0) \
206-
XX(Interval64, NYql::NProto::Interval64, TInterval64, CommonType | TimeIntervalType | BigDateType, i64, 0) \
207-
XX(TzDate32, NYql::NProto::TzDate32, TTzDate32, CommonType | TzDateType | BigDateType, i32, 0) \
208-
XX(TzDatetime64, NYql::NProto::TzDatetime64, TTzDatetime64, CommonType | TzDateType | BigDateType, i64, 0) \
209-
XX(TzTimestamp64, NYql::NProto::TzTimestamp64, TTzTimestamp64, CommonType | TzDateType | BigDateType, i64, 0) \
210+
XX(Date32, NYql::NProto::Date32, TDate32, CommonType | DateType | ExtDateType, i32, 0) \
211+
XX(Datetime64, NYql::NProto::Datetime64, TDatetime64, CommonType | DateType | ExtDateType, i64, 0) \
212+
XX(Timestamp64, NYql::NProto::Timestamp64, TTimestamp64, CommonType | DateType | ExtDateType, i64, 0) \
213+
XX(Interval64, NYql::NProto::Interval64, TInterval64, CommonType | TimeIntervalType | ExtDateType, i64, 0) \
214+
XX(TzDate32, NYql::NProto::TzDate32, TTzDate32, CommonType | TzDateType | ExtDateType, i32, 0) \
215+
XX(TzDatetime64, NYql::NProto::TzDatetime64, TTzDatetime64, CommonType | TzDateType | ExtDateType, i64, 0) \
216+
XX(TzTimestamp64, NYql::NProto::TzTimestamp64, TTzTimestamp64, CommonType | TzDateType | ExtDateType, i64, 0) \
210217

211218
#define UDF_TYPE_ID(xName, xTypeId, xType, xFeatures, xLayoutType, xParamsCount) \
212219
template <> \

0 commit comments

Comments
 (0)