-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multicolumn sparsed test #8284
Multicolumn sparsed test #8284
Conversation
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
@@ -81,6 +85,24 @@ class TSimpleArrayConstructor: public IArrayBuilder { | |||
} | |||
}; | |||
|
|||
template <class TFiller> | |||
class TSimpleArrayShiftConstructor: public TSimpleArrayConstructor<TFiller> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а зачем? перетащи переменную в базовый класс и сделай accessor
@@ -25,6 +26,40 @@ class TIntSeqFiller { | |||
} | |||
}; | |||
|
|||
template <class TArrowType> | |||
class TIntPoolFiller { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а нельзя обобщить вместе с пулом строк, склеив?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В конструкторе TStringPoolFiller параметров больше, там максимальная длина строки задается и сама рандомная строка другим методом получается
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно генератор сделать внешним параметром (интерфейс или шаблонный)
return result; | ||
} | ||
|
||
void TTypedLocalHelper::CreateMultiColumnOlapTableWithStore(ui32 reps, ui32 storeShardsCount, ui32 tableShardsCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а это ты скопировал откуда-то? нельзя переиспользовать?
ydb/core/kqp/ut/olap/sparsed_ut.cpp
Outdated
@@ -19,6 +19,10 @@ Y_UNIT_TEST_SUITE(KqpOlapSparsed) { | |||
TKikimrRunner Kikimr; | |||
NKikimr::NYDBTest::TControllers::TGuard<NKikimr::NYDBTest::NColumnShard::TController> CSController; | |||
const TString StoreName; | |||
ui32 MultiColumnRepCount = 100; | |||
static const ui32 FIELD_COUNT = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а нельзя вектор сделать и от него size брать?
ydb/core/kqp/ut/olap/sparsed_ut.cpp
Outdated
@@ -39,58 +43,148 @@ Y_UNIT_TEST_SUITE(KqpOlapSparsed) { | |||
return GetUint64(rows[0].at("count")); | |||
} | |||
|
|||
ui32 GetDefaultsCount() const { | |||
auto selectQuery = TString(R"( | |||
ui32 GetDefaultsCount(const char* fieldName, const char* defValueStr) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а давай не char* использовать везде, а TString или std::string
{ | ||
NArrow::NConstruction::TStringPoolFiller sPool(1000, 52, "abcde", frq); | ||
helper.FillTable(sPool, shiftKff, 10000); | ||
void GetAllDefaultsCount(ui64* counts, ui32 skipCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай генерацию схемы с данными в отдельный класс в отдельный файл вынесем? очень популярная тема - хочу, чтобы было что переиспользовать
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
@@ -25,6 +26,40 @@ class TIntSeqFiller { | |||
} | |||
}; | |||
|
|||
template <class TArrowType> | |||
class TIntPoolFiller { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно генератор сделать внешним параметром (интерфейс или шаблонный)
@@ -83,11 +85,38 @@ class TTypedLocalHelper: public Tests::NCS::THelper { | |||
TBase::SendDataViaActorSystem(TablePath, batch); | |||
} | |||
|
|||
void FillMultiColumnTable(ui32 repCount, const double pkKff = 0, const ui32 numRows = 800000) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вот тут генерацию батча можно хорошо параметризировать и переиспользовать...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сейчас есть такой объект как NTest::TTestColumn
И везде сейчас кастомные построения Builder, etc...
Хочется, чтобы в TTestColumn можно было задать способ генерации данных (возможно, не совпадающий с метаданными, описывающими схему, но по умолчанию берущий данные из схемы)
И тогда класс принимает на вход список TTestColumn и может сделать вариативно - построить arrow::RecordBatch, сделать запрос на построение схемы, построить arrow::Schema
для начала - самое то. тогда можно будет сделать аккуратнее и убрать код в следующих местах:
ut_columnshard_schema.cpp:MakeData
columnshard_ut_common.cpp:MakeTestBlob
core/testlib/cs_helper.cpp:NKikimr::Tests::NCS::THelper::TestArrowBatch
TCickBenchHelper::TestArrowBatch
в общем - поищи - там по тестам везде постоянно генерят данные, строят схемы -- хочется все это для всех тестов унифицировать, используя TTestColumn, в котором можно указать, например, что
генерация данных одна, а типа данных для схемы - другой. чтобы это везде переиспользовалось потом
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
...
Changelog category
Additional information
...