diff options
| author | vvvv <[email protected]> | 2023-04-21 12:28:54 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2023-04-21 12:28:54 +0300 |
| commit | b1d5ce58e6a57d9cff019817db28fabfe3996f64 (patch) | |
| tree | 8adca4da1d392ee719fef8fc868c9e0fba6ac57c | |
| parent | 9ee06352e3ca85c021cb643d0c7ff220225c120a (diff) | |
Fixed signature detection in DateTime::GetHour on Optional<TM> argument
| -rw-r--r-- | ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp b/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp index be3930d24d4..4ad21a52ea6 100644 --- a/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp +++ b/ydb/library/yql/udfs/common/datetime2/datetime_udf.cpp @@ -246,14 +246,14 @@ struct TGetTimeComponent { argType = block.GetItemType(); } + bool isOptional = false; + if (auto opt = TOptionalTypeInspector(*typeInfoHelper, argType)) { + argType = opt.GetItemType(); + isOptional = true; + } + TResourceTypeInspector res(*typeInfoHelper, argType); if (!res) { - bool isOptional = false; - if (auto opt = TOptionalTypeInspector(*typeInfoHelper, argType)) { - argType = opt.GetItemType(); - isOptional = true; - } - TDataTypeInspector data(*typeInfoHelper, argType); if (!data) { builder.SetError("Expected data type"); |
