Skip to content

[WIP] Try to support nullable complex types such as Tuple/Array/Map - #53443

Closed
taiyang-li wants to merge 27 commits into
ClickHouse:masterfrom
bigo-sg:ch_52562
Closed

taiyang-li wants to merge 27 commits into
ClickHouse:masterfrom
bigo-sg:ch_52562

Conversation

@taiyang-li

@taiyang-li taiyang-li commented Aug 15, 2023 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Try to support nullable complex types such as Tuple/Array/Map. Close #52562

Including those changes

  • allow nullable complex data types and columns
  • fix compatiability issue of nullable complex data types when function executing frameworks
  • fix compatiability issue of nullable complex data types when reading/writing from ORC/Parquet
  • fix compatiability issue of nullable complex data types in some functions

@taiyang-li

Copy link
Copy Markdown
Contributor Author

@alexey-milovidov This is the first version, let's see what failures in ci will happen and then fix them.

@robot-clickhouse robot-clickhouse added the pr-feature Pull request with new product feature label Aug 15, 2023
@robot-clickhouse

robot-clickhouse commented Aug 15, 2023 •

Copy link
Copy Markdown
Member

This is an automated comment for commit df97028 with description of existing statuses. It's updated for the latest CI running
The full report is available here
The overall status of the commit is 🔴 failure

Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR🟡 pending
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here🔴 failure
Mergeable CheckChecks if all other necessary checks are successful🟢 success
Push to DockerhubThe check for building and pushing the CI related docker images to docker hub🟢 success
Style CheckRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report🟢 success

@robot-clickhouse robot-clickhouse added pr-improvement Pull request with some product improvements and removed pr-feature Pull request with new product feature labels Aug 15, 2023
@taiyang-li
taiyang-li marked this pull request as draft August 15, 2023 09:38
@taiyang-li
taiyang-li marked this pull request as ready for review August 16, 2023 08:02
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Aug 17, 2023
@taiyang-li

taiyang-li commented Aug 17, 2023 •

Copy link
Copy Markdown
Contributor Author

Below functions need to be improved for nullable complex compatiability. I'm afraid it is a huge work for myself, do you have any plan about cooperation with me on this PR? If you have any ideas, pls let me know. @alexey-milovidov

$ cd src/Functions && grep -e DataTypeTuple -e DataTypeArray -e DataTypeMap * -R | awk -F':' '{print $1}' | sort | uniq | xargs grep useDefaultImplementationForNulls 
array/array.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
array/arrayIndex.h:    bool useDefaultImplementationForNulls() const override { return false; }
array/arrayPop.h:    bool useDefaultImplementationForNulls() const override { return false; }
array/arrayPush.h:    bool useDefaultImplementationForNulls() const override { return false; }
array/arrayResize.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
array/arraySlice.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
array/arrayWithConstant.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
array/FunctionsMapMiscellaneous.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
array/range.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
caseWithExpression.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
catboostEvaluate.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
FunctionBinaryArithmetic.h:    bool useDefaultImplementationForNulls() const override
FunctionsCodingIP.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
FunctionsCodingIP.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
FunctionsComparison.h:            /// We useDefaultImplementationForNulls, but it doesn't work for tuples.
FunctionsConversion.h:    bool useDefaultImplementationForNulls() const override
FunctionsConversion.h:    bool useDefaultImplementationForNulls() const override { return false; }
FunctionsExternalDictionaries.h:    bool useDefaultImplementationForNulls() const final { return false; }
FunctionsExternalDictionaries.h:    bool useDefaultImplementationForNulls() const override { return false; }
FunctionsJSON.h:    bool useDefaultImplementationForNulls() const override { return false; }
FunctionsJSON.h:    bool useDefaultImplementationForNulls() const override { return false; }
if.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
in.cpp:    bool useDefaultImplementationForNulls() const override { return null_is_skipped; }
map.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
map.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
minSampleSize.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
tokenExtractors.cpp:    bool useDefaultImplementationForNulls() const override { return true; }
transform.cpp:        bool useDefaultImplementationForNulls() const override { return false; }
tuple.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
tupleElement.cpp:    bool useDefaultImplementationForNulls() const override { return false; }
ztest.cpp:    bool useDefaultImplementationForNulls() const override { return false; }

@clickhouse-gh

clickhouse-gh Bot commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@taiyang-li

Copy link
Copy Markdown
Contributor Author

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

I'll keep working on it

@UnamedRus UnamedRus mentioned this pull request Aug 9, 2024
19 tasks
@clickhouse-gh

clickhouse-gh Bot commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

1 similar comment
@clickhouse-gh

clickhouse-gh Bot commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@clickhouse-gh

clickhouse-gh Bot commented Dec 31, 2024

Copy link
Copy Markdown
Contributor

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

1 similar comment
@clickhouse-gh

clickhouse-gh Bot commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@clickhouse-gh

clickhouse-gh Bot commented May 6, 2025

Copy link
Copy Markdown
Contributor

Dear @taiyang-li, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@alexey-milovidov

Copy link
Copy Markdown
Member

@taiyang-li, keep?

@taiyang-li

Copy link
Copy Markdown
Contributor Author

@taiyang-li, keep?

It seems that we can't finish it in short term. Let's close it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support nullable complex types such as Tuple/Array/Map

5 participants