aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2023-09-06 11:07:44 +0300
committeruzhas <uzhas@ydb.tech>2023-09-06 11:27:33 +0300
commitee92fee2d806dd933291766e2f42948c481b6398 (patch)
tree27569fa36f84a81c2c6441d34029e4e3103e89ca
parentc63bca57ce490706a0305814f5795b259802ae92 (diff)
downloadydb-ee92fee2d806dd933291766e2f42948c481b6398.tar.gz
enable test_insert for v2
-rw-r--r--ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp b/ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp
index 9000aaef8e..cabe474f27 100644
--- a/ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp
+++ b/ydb/library/yql/providers/s3/provider/yql_s3_datasink_type_ann.cpp
@@ -124,13 +124,19 @@ private:
}
}
+ const auto format = tgt.Format();
+ const bool isSingleRowPerFileFormat = IsIn({TStringBuf("raw"), TStringBuf("json_list")}, format);
+
+ const TTypeAnnotationNode* listItemType = ctx.MakeType<TDataExprType>(EDataSlot::String);
+ if (!isSingleRowPerFileFormat) {
+ listItemType = ctx.MakeType<TOptionalExprType>(listItemType);
+ }
+
input->SetTypeAnn(
ctx.MakeType<TTupleExprType>(
TTypeAnnotationNode::TListType{
ctx.MakeType<TListExprType>(
- ctx.MakeType<TOptionalExprType>(
- ctx.MakeType<TDataExprType>(EDataSlot::String)
- )
+ listItemType
)
}
)