Skip to content

Respect case insensitive-column matching for fields in tuple columns#73780

Merged
rschu1ze merged 11 commits intoClickHouse:masterfrom
bigo-sg:support_tuple_case_match
Mar 6, 2025
Merged

Respect case insensitive-column matching for fields in tuple columns#73780
rschu1ze merged 11 commits intoClickHouse:masterfrom
bigo-sg:support_tuple_case_match

Conversation

@taiyang-li
Copy link
Copy Markdown
Contributor

@taiyang-li taiyang-li commented Dec 24, 2024

Changelog category (leave one):

  • Improvement

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

Respect column insensitive column matching for fields in tuple columns. Close apache/gluten#8324

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

CI Settings (Only check the boxes if you know what you are doing)

All builds in Builds_1 and Builds_2 stages are always mandatory
and will run independently of the checks below:

  • Allow: All Required Checks
  • Allow: Stateless tests
  • Allow: Stateful tests
  • Allow: Integration Tests
  • Allow: Performance tests
  • Allow: All Builds
  • Allow: batch 1, 2 for multi-batch jobs
  • Allow: batch 3, 4, 5, 6 for multi-batch jobs

  • Exclude: Style check
  • Exclude: Fast test
  • Exclude: All with ASAN
  • Exclude: All with TSAN, MSAN, UBSAN, Coverage
  • Exclude: All with aarch64
  • Exclude: All with release
  • Exclude: All with debug

  • Run only fuzzers related jobs (libFuzzer fuzzers, AST fuzzers, etc.)
  • Exclude: AST fuzzers

  • Do not test
  • Woolen Wolfdog
  • Upload binaries for special builds
  • Disable merge-commit
  • Disable CI cache

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-improvement Pull request with some product improvements label Dec 24, 2024
@robot-ch-test-poll1
Copy link
Copy Markdown
Contributor

robot-ch-test-poll1 commented Dec 24, 2024

This is an automated comment for commit 8c27bda with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests❌ failure
Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
BuzzHouse (asan)There's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
BuzzHouse (debug)There's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
BuzzHouse (msan)There's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
BuzzHouse (tsan)There's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
BuzzHouse (ubsan)There's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns ClickBench with instant-attach table✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ success
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✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ 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
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

@taiyang-li
Copy link
Copy Markdown
Contributor Author

@alexey-milovidov would you like to review it, thanks!

@taiyang-li
Copy link
Copy Markdown
Contributor Author

@alexey-milovidov any comments?

@rschu1ze
Copy link
Copy Markdown
Member

@divanik Like to check this PR?

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 10, 2025

Workflow [PR], commit [45f0128]

@taiyang-li
Copy link
Copy Markdown
Contributor Author

@rschu1ze can you successly reproduce the errors in tests/performance/short_circuit_nulls.xml ? I tried but failed.

short_circuit_nulls.query1.prewarm0: DB::Exception: Expected the argument №1 ('materialize(CAST(if(equals(modulo(__table1.number, 10000_UInt16), 0_UInt8), 'bye'_String, _CAST(NULL_Nullable(Nothing), 'Nullable(Nothing)'_String)), 'Nullable(String)'_String))' of type String) to have 7 rows, but it has 65402: while executing 'FUNCTION concat(materialize(CAST(if(equals(modulo(__table1.number, 10000_UInt16), 0_UInt8), 'bye'_String, _CAST(NULL_Nullable(Nothing), 'Nullable(Nothing)'_String)), 'Nullable(String)'_String)) :: 5, materialize('hello'_String) :: 0, materialize(' clickhouse'_String) :: 6) -> concat(materialize(CAST(if(equals(modulo(__table1.number, 10000_UInt16), 0_UInt8), 'bye'_String, _CAST(NULL_Nullable(Nothing), 'Nullable(Nothing)'_String)), 'Nullable(String)'_String)), materialize('hello'_String), materialize(' clickhouse'_String)) Nullable(String) : 4'. Stack trace:

0. ./build_docker/./src/Common/Exception.cpp:108: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000d8bcbdb
1. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x0000000008978bac
2. DB::Exception::Exception<unsigned long, String const&, String, unsigned long&, unsigned long&>(int, FormatStringHelperImpl<std::type_identity<unsigned long>::type, std::type_identity<String const&>::type, std::type_identity<String>::type, std::type_identity<unsigned long&>::type, std::type_identity<unsigned long&>::type>, unsigned long&&, String const&, String&&, unsigned long&, unsigned long&) @ 0x000000000ffacf4f
3. DB::checkFunctionArgumentSizes(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, unsigned long) @ 0x000000000ffacb58
4. ./build_docker/./src/Functions/IFunctionAdaptors.cpp:9: DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x000000000ff9e4e3
5. DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000000ff97b3d
6. DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000000ff98286
7. DB::IExecutableFunction::executeWithoutSparseColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000000ff98dde
8. DB::IExecutableFunction::execute(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000000ff99ffb
9. ./build_docker/./src/Interpreters/ExpressionActions.cpp:636: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool, bool) const @ 0x0000000011522f79
10. ./build_docker/./src/Processors/Transforms/ExpressionTransform.cpp:25: DB::ExpressionTransform::transform(DB::Chunk&) @ 0x0000000013317bd6
11. ./src/Processors/ISimpleTransform.h:33: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x000000000f9aea53
12. ./build_docker/./src/Processors/ISimpleTransform.cpp:89: DB::ISimpleTransform::work() @ 0x0000000013075375
13. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:53: DB::ExecutionThreadContext::executeTask() @ 0x00000000130945f6
14. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:291: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x0000000013086fe4
15. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:257: DB::PipelineExecutor::execute(unsigned long, bool) @ 0x000000001308629e
16. ./build_docker/./src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:83: void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000013097f12
17. ./contrib/llvm-project/libcxx/include/__functional/function.h:716: ? @ 0x000000000d99821f
18. ./contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117: void* std::__thread_proxy[abi:ne190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x000000000d99f39a
19. ? @ 0x00007fcc2d8a9ac3
20. ? @ 0x00007fcc2d93b850

@taiyang-li taiyang-li force-pushed the support_tuple_case_match branch from 557ec4f to 6561959 Compare February 25, 2025 08:15
@alexey-milovidov alexey-milovidov changed the title Respect column insensitive column matching for fields in tuple columns Respect case insensitive column matching for fields in tuple columns Feb 27, 2025
@rschu1ze rschu1ze changed the title Respect case insensitive column matching for fields in tuple columns Respect case insensitive-column matching for fields in tuple columns Mar 6, 2025
@rschu1ze
Copy link
Copy Markdown
Member

rschu1ze commented Mar 6, 2025

@taiyang-li Thanks for the PR. I wanted to push some small fixups but got a 403:

/data/ch (support_tuple_case_match >) $ git push bigo-sg support_tuple_case_match
remote: Permission to bigo-sg/ClickHouse.git denied to rschu1ze.
fatal: unable to access 'https://github.com/bigo-sg/ClickHouse.git/': The requested URL returned error: 403

I'll push these separately.

Besides that, the PR looks good.

@rschu1ze rschu1ze added this pull request to the merge queue Mar 6, 2025
Merged via the queue into ClickHouse:master with commit 67023bc Mar 6, 2025
122 of 125 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 6, 2025
@taiyang-li
Copy link
Copy Markdown
Contributor Author

@rschu1ze thanks for your reviews. I think I forgot to choose "allow edits from maintainers"... I’ll try to make sure I check it next time.

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

Labels

pr-improvement Pull request with some product improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CH] Support case-insensitive column matching for fields in struct otherwise struct column read from orc/parquet would be wrong

6 participants