-
Notifications
You must be signed in to change notification settings - Fork 411
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
feat(expr):support is_ipv4 and is_ipv6 expr to tiflash #6773
Conversation
pushdown to tiflash
[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. |
/run-all-tests |
/run-all-tests |
/run-all-tests |
/cc @JaySon-Huang |
Revise according to review comments Co-authored-by: yanweiqi <[email protected]>
Co-authored-by: yanweiqi <[email protected]>
Co-authored-by: yanweiqi <[email protected]>
Co-authored-by: yanweiqi <[email protected]>
Co-authored-by: yanweiqi <[email protected]>
/run-all-tests |
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.
good job! Others LGTM
void executeImpl(Block & block, const ColumnNumbers & arguments, size_t result) const override | ||
{ | ||
auto [column, nullmap] = removeNullable(block.getByPosition(arguments[0]).column.get()); | ||
if (const auto * col_input = checkAndGetColumn<ColumnString>(column)) |
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.
Does this hold true for the case where the input is only null
?
Is there an ut to guarantee this?
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.
thank u very much~
Before there was a test case where the input was all NULL
for testing ConstColumn
https://github.com/AntiTopQuark/support_ipv4_and_ipv6_func/blob/09fd7fd29c83f298ee654c9b9a416601a718b854/dbms/src/Functions/tests/gtest_is_ip_addr.cpp#L80
ASSERT_COLUMN_EQ(createConstColumn<UInt8>(4, 0), executeFunction("tiDBIsIPv6", {createConstColumn<Nullable<String>>(4, std::nullopt)}));
now I added another one
ASSERT_COLUMN_EQ(createColumn<UInt8>({0, 0, 0, 0, 0}), executeFunction("tiDBIsIPv6", {createColumn<Nullable<String>>({std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt})}));
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.
Can you test for DataTypeNullable<DataTypeNothing>
?
You can use
ColumnWithTypeAndName createOnlyNullColumnConst(size_t size, const String & name = "");
ColumnWithTypeAndName createOnlyNullColumn(size_t size, const String & name = "");
in FunctionTestUtils
.
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.
You can refer to gtest_strings_concat_ws.cpp
/run-all-tests |
/run-all-tests |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/merge |
@Lloyd-Pottiger: 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: 32cef30
|
pushdown to tiflash
What problem does this PR solve?
Issue Number: close #5120
close #5121
Problem Summary:
support is_ipv4() and is_ipv6() expr to pushdown to tiflash
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note