-
Notifications
You must be signed in to change notification settings - Fork 409
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
Test: RandomGenColumns #5743
Test: RandomGenColumns #5743
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/rebuild |
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
namespace tests | ||
{ | ||
|
||
TEST(TestColumnGenerator, run) |
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.
I think there is no need to test
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.
I think there is no need to test
Maybe it will be used in the future. The code is not used in the project, so I just use the test to ensure that the function will not crash
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 is no need to consider a lot for "future". The logical of this case is simple, local test is enough. Unit test give pressure to ci.
if (family_name == "Int8" || family_name == "Int16" || family_name == "Int32" || family_name == "Int64") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genInt(col); | ||
} | ||
else if (family_name == "UInt8" || family_name == "UInt16" || family_name == "UInt32" || family_name == "UInt64") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genUInt(col); | ||
} | ||
else if (family_name == "Float32" || family_name == "Float64") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genFloat(col); | ||
} | ||
else if (family_name == "String") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genString(col); | ||
} | ||
else if (family_name == "MyDateTime") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genDateTime(col); | ||
} | ||
else if (family_name == "MyDate") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genDate(col); | ||
} | ||
else if (family_name == "Decimal") | ||
{ | ||
for (size_t i = 0; i < opts.size; ++i) | ||
genDecimal(col, type); | ||
} |
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.
Maybe we can use TypeIndex::xxxx
res.column = std::move(col); | ||
return res; |
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.
res.column = std::move(col); | |
return res; | |
return {col, type}; |
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.
Other LGTM
/merge |
@ywqzzy: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: f11b35a
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #4609
Problem Summary:
What is changed and how it works?
Generate different type of columns with different size, can be used in further micro bench of compute engine.
Check List
Tests
Side effects
Documentation
Release note