diff options
author | ssmike <[email protected]> | 2023-11-17 21:30:43 +0300 |
---|---|---|
committer | ssmike <[email protected]> | 2023-11-17 22:04:52 +0300 |
commit | 983dd8625f86eab8f1af1b53c44ad49df392dadc (patch) | |
tree | 99be19a7b0e3459b3f57b3dd7ac557dc39102765 | |
parent | 59b3011ab3bee99f38624f4600a60b3c3a2f2a8d (diff) |
fix typeann
-rw-r--r-- | ydb/library/yql/core/extract_predicate/extract_predicate_impl.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ydb/library/yql/core/extract_predicate/extract_predicate_impl.cpp b/ydb/library/yql/core/extract_predicate/extract_predicate_impl.cpp index 3e660f2b3eb..c61fd058302 100644 --- a/ydb/library/yql/core/extract_predicate/extract_predicate_impl.cpp +++ b/ydb/library/yql/core/extract_predicate/extract_predicate_impl.cpp @@ -1932,14 +1932,9 @@ IGraphTransformer::TStatus ConvertLiteral(TExprNode::TPtr& node, const NYql::TTy auto toFeatures = NUdf::GetDataTypeInfo(to).Features; if ((fromFeatures & NUdf::TzDateType) && (toFeatures & (NUdf::DateType| NUdf::TzDateType)) || (toFeatures & NUdf::TzDateType) && (fromFeatures & (NUdf::DateType | NUdf::TzDateType))) { - node = ctx.Builder(node->Pos()) - .Callable("Apply") - .Callable(0, "Udf") - .Atom(0, TString("DateTime2.Make") + expectedType.Cast<TDataExprType>()->GetName()) - .Seal() - .Add(1, node->HeadPtr()) - .Seal() - .Build(); + const auto pos = node->Pos(); + auto type = ExpandType(pos, expectedType, ctx); + node = ctx.NewCallable(pos, "SafeCast", {std::move(node), std::move(type)}); return IGraphTransformer::TStatus::Repeat; } } |