Skip to content

Commit fb4ef75

Browse files
committed
fixes
1 parent 1ff9882 commit fb4ef75

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

ydb/library/yql/providers/yt/common/yql_configuration.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include <ydb/library/yql/public/udf/udf_data_type.h>
4+
35
#include <util/system/types.h>
46
#include <util/datetime/base.h>
57
#include <util/generic/size_literals.h>
@@ -57,7 +59,16 @@ constexpr bool DEFAULT_USE_RPC_READER_IN_DQ = false;
5759
constexpr size_t DEFAULT_RPC_READER_INFLIGHT = 1;
5860
constexpr TDuration DEFAULT_RPC_READER_TIMEOUT = TDuration::Seconds(120);
5961
const TSet<TString> DEFAULT_BLOCK_READER_SUPPORTED_TYPES = {"pg", "tuple"};
60-
const TSet<TString> DEFAULT_BLOCK_READER_SUPPORTED_DATA_TYPES = {"Int8", "Uint8", "Int16", "Uint16", "Int32", "Uint32", "Int64", "Uint64", "String", "Yson", "Json", "Bool", "Double"};
62+
const TSet<NUdf::EDataSlot> DEFAULT_BLOCK_READER_SUPPORTED_DATA_TYPES =
63+
{
64+
NUdf::EDataSlot::Int8, NUdf::EDataSlot::Uint8,
65+
NUdf::EDataSlot::Int16, NUdf::EDataSlot::Uint16,
66+
NUdf::EDataSlot::Int32, NUdf::EDataSlot::Uint32,
67+
NUdf::EDataSlot::Int64, NUdf::EDataSlot::Uint64,
68+
NUdf::EDataSlot::Bool, NUdf::EDataSlot::Double,
69+
NUdf::EDataSlot::String, NUdf::EDataSlot::Json,
70+
NUdf::EDataSlot::Yson, NUdf::EDataSlot::Utf8
71+
};
6172

6273
constexpr auto DEFAULT_SWITCH_MEMORY_LIMIT = 128_MB;
6374

ydb/library/yql/providers/yt/common/yql_yt_settings.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <ydb/library/yql/providers/common/codec/yql_codec_type_flags.h>
44
#include <ydb/library/yql/utils/log/log.h>
5+
#include <ydb/library/yql/public/udf/udf_data_type.h>
56

67
#include <library/cpp/yson/node/node_io.h>
78

@@ -461,7 +462,16 @@ TYtConfiguration::TYtConfiguration()
461462
REGISTER_SETTING(*this, DQRPCReaderInflight).Lower(1);
462463
REGISTER_SETTING(*this, DQRPCReaderTimeout);
463464
REGISTER_SETTING(*this, BlockReaderSupportedTypes);
464-
REGISTER_SETTING(*this, BlockReaderSupportedDataTypes);
465+
REGISTER_SETTING(*this, BlockReaderSupportedDataTypes)
466+
.Parser([](const TString& v) {
467+
TSet<TString> vec;
468+
StringSplitter(v).SplitBySet(",").AddTo(&vec);
469+
TSet<NUdf::EDataSlot> res;
470+
for (auto& s: vec) {
471+
res.emplace(NUdf::GetDataSlot(s));
472+
}
473+
return res;
474+
});
465475
REGISTER_SETTING(*this, MaxCpuUsageToFuseMultiOuts).Lower(1.0);
466476
REGISTER_SETTING(*this, MaxReplicationFactorToFuseMultiOuts).Lower(1.0);
467477
REGISTER_SETTING(*this, ApplyStoredConstraints)

ydb/library/yql/providers/yt/common/yql_yt_settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ struct TYtSettings {
197197
NCommon::TConfSetting<size_t, true> DQRPCReaderInflight;
198198
NCommon::TConfSetting<TDuration, true> DQRPCReaderTimeout;
199199
NCommon::TConfSetting<TSet<TString>, true> BlockReaderSupportedTypes;
200-
NCommon::TConfSetting<TSet<TString>, true> BlockReaderSupportedDataTypes;
200+
NCommon::TConfSetting<TSet<NUdf::EDataSlot>, true> BlockReaderSupportedDataTypes;
201201

202202
// Optimizers
203203
NCommon::TConfSetting<bool, true> _EnableDq;

ydb/library/yql/providers/yt/provider/yql_yt_dq_integration.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ namespace {
4646
ctx.IssueManager.RaiseIssue(info);
4747
}
4848

49-
bool CheckSupportedTypes(const TSet<TString>& list, const TSet<TString>& dataTList, const TStructExprType* types, TExprContext& ctx) {
49+
bool CheckSupportedTypes(const TSet<TString>& list, const TSet<NUdf::EDataSlot>& dataTypesSupported, const TStructExprType* types, TExprContext& ctx) {
5050
TSet<ETypeAnnotationKind> supported;
51-
TSet<NUdf::EDataSlot> dataTypesSupported;
5251
for (const auto &e: list) {
5352
if (e == "pg") {
5453
supported.insert(ETypeAnnotationKind::Pg);
@@ -68,12 +67,9 @@ namespace {
6867
return false;
6968
}
7069
}
71-
if (dataTList.size()) {
70+
if (dataTypesSupported.size()) {
7271
supported.emplace(ETypeAnnotationKind::Data);
7372
}
74-
for (const auto &e: dataTList) {
75-
dataTypesSupported.emplace(NUdf::GetDataSlot(e));
76-
}
7773
auto checkType = [&] (const TTypeAnnotationNode* type) {
7874
if (type->GetKind() == ETypeAnnotationKind::Data) {
7975
if (!supported.contains(ETypeAnnotationKind::Data)) {

0 commit comments

Comments
 (0)