aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2023-07-10 13:26:41 +0300
committeruzhas <uzhas@ydb.tech>2023-07-10 13:26:41 +0300
commit47f000036640d78989cdb6de0e8b481855c37f0a (patch)
treeceedd2c0c3780bbd59fa1371c62efed783d3d28e
parent29ce72d8372ec080206551b02e4c05cde6f1588a (diff)
downloadydb-47f000036640d78989cdb6de0e8b481855c37f0a.tar.gz
fix type formatting for DDL
-rw-r--r--ydb/core/fq/libs/control_plane_proxy/CMakeLists.darwin-x86_64.txt1
-rw-r--r--ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-x86_64.txt1
-rw-r--r--ydb/core/fq/libs/control_plane_proxy/CMakeLists.windows-x86_64.txt1
-rw-r--r--ydb/core/fq/libs/control_plane_proxy/control_plane_proxy.cpp12
-rw-r--r--ydb/core/fq/libs/control_plane_proxy/ya.make1
6 files changed, 13 insertions, 4 deletions
diff --git a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.darwin-x86_64.txt b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.darwin-x86_64.txt
index e8fc9d5971..631673b30c 100644
--- a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.darwin-x86_64.txt
+++ b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.darwin-x86_64.txt
@@ -26,6 +26,7 @@ target_link_libraries(fq-libs-control_plane_proxy PUBLIC
libs-control_plane_proxy-events
fq-libs-control_plane_storage
libs-rate_limiter-events
+ fq-libs-result_formatter
ydb-core-mon
ydb-library-folder_service
ydb-library-security
diff --git a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-aarch64.txt b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-aarch64.txt
index ef702e4856..df189785d0 100644
--- a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-aarch64.txt
@@ -27,6 +27,7 @@ target_link_libraries(fq-libs-control_plane_proxy PUBLIC
libs-control_plane_proxy-events
fq-libs-control_plane_storage
libs-rate_limiter-events
+ fq-libs-result_formatter
ydb-core-mon
ydb-library-folder_service
ydb-library-security
diff --git a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-x86_64.txt b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-x86_64.txt
index ef702e4856..df189785d0 100644
--- a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-x86_64.txt
+++ b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.linux-x86_64.txt
@@ -27,6 +27,7 @@ target_link_libraries(fq-libs-control_plane_proxy PUBLIC
libs-control_plane_proxy-events
fq-libs-control_plane_storage
libs-rate_limiter-events
+ fq-libs-result_formatter
ydb-core-mon
ydb-library-folder_service
ydb-library-security
diff --git a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.windows-x86_64.txt b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.windows-x86_64.txt
index e8fc9d5971..631673b30c 100644
--- a/ydb/core/fq/libs/control_plane_proxy/CMakeLists.windows-x86_64.txt
+++ b/ydb/core/fq/libs/control_plane_proxy/CMakeLists.windows-x86_64.txt
@@ -26,6 +26,7 @@ target_link_libraries(fq-libs-control_plane_proxy PUBLIC
libs-control_plane_proxy-events
fq-libs-control_plane_storage
libs-rate_limiter-events
+ fq-libs-result_formatter
ydb-core-mon
ydb-library-folder_service
ydb-library-security
diff --git a/ydb/core/fq/libs/control_plane_proxy/control_plane_proxy.cpp b/ydb/core/fq/libs/control_plane_proxy/control_plane_proxy.cpp
index 0d86e95bff..6988efd69b 100644
--- a/ydb/core/fq/libs/control_plane_proxy/control_plane_proxy.cpp
+++ b/ydb/core/fq/libs/control_plane_proxy/control_plane_proxy.cpp
@@ -13,6 +13,7 @@
#include <ydb/core/fq/libs/control_plane_storage/util.h>
#include <ydb/core/fq/libs/quota_manager/quota_manager.h>
#include <ydb/core/fq/libs/rate_limiter/events/control_plane_events.h>
+#include <ydb/core/fq/libs/result_formatter/result_formatter.h>
#include <ydb/core/fq/libs/test_connection/events/events.h>
#include <ydb/core/fq/libs/test_connection/test_connection.h>
#include <ydb/core/fq/libs/ydb/util.h>
@@ -828,13 +829,16 @@ public:
const auto& subset = objectStorageParams.subset(0);
// Schema
- auto columnsTransformFunction = [](const Ydb::Column& column) -> TString {
+ NYql::TExprContext context;
+ auto columnsTransformFunction = [&](const Ydb::Column& column) -> TString {
+ NYdb::TTypeParser typeParser(column.type());
+ auto node = MakeType(typeParser, context);
+ auto typeName = NYql::FormatType(node);
return fmt::format(
" {columnName} {columnType}",
"columnName"_a = EncloseAndEscapeString(column.name(), '`'),
- "columnType"_a =
- NYdb::TType{column.type()}
- .ToString()); // TODO: check if this conversion could lead to valnurability
+ "columnType"_a = typeName
+ );
};
auto columnsBegin =
MakeMappedIterator(subset.schema().column().begin(), columnsTransformFunction);
diff --git a/ydb/core/fq/libs/control_plane_proxy/ya.make b/ydb/core/fq/libs/control_plane_proxy/ya.make
index 264f857556..ebcb92eada 100644
--- a/ydb/core/fq/libs/control_plane_proxy/ya.make
+++ b/ydb/core/fq/libs/control_plane_proxy/ya.make
@@ -17,6 +17,7 @@ PEERDIR(
ydb/core/fq/libs/control_plane_proxy/events
ydb/core/fq/libs/control_plane_storage
ydb/core/fq/libs/rate_limiter/events
+ ydb/core/fq/libs/result_formatter
ydb/core/mon
ydb/library/folder_service
ydb/library/security