Skip to content

ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different#85135

Merged
CheSema merged 7 commits intomasterfrom
chesema-mv-different-types
Aug 7, 2025
Merged

ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different#85135
CheSema merged 7 commits intomasterfrom
chesema-mv-different-types

Conversation

@CheSema
Copy link
Copy Markdown
Member

@CheSema CheSema commented Aug 6, 2025

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

fixing ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Aug 6, 2025

Workflow [PR], commit [f2d925b]

Summary:

job_name test_name status info comment
Bugfix validation (integration tests) failure
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_view[unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[S3Queue-unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[S3Queue-ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[AzureQueue-ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_many_views[ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_file[ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_virtual_columns[2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[S3Queue-ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_multiple_files[ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_multiple_files[unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_many_views[unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_multiple_files[unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_file[unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[AzureQueue-unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[S3Queue-ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_view[unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[AzureQueue-unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[S3Queue-unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[S3Queue-unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_many_views[unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_file[unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[AzureQueue-ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_file[ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[AzureQueue-ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[AzureQueue-ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[AzureQueue-ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[S3Queue-unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_many_views[ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_file[ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_multiple_tables_meta_mismatch[3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[S3Queue-ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_multiple_tables_meta_mismatch[2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_virtual_columns[1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_many_views[unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_multiple_files[unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[AzureQueue-unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_virtual_columns[3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[S3Queue-unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[S3Queue-ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[S3Queue-unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_multiple_files[ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_view[ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_many_views[ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_view[ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[AzureQueue-unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_file[unordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_view[ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_direct_select_multiple_files[ordered-3-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[AzureQueue-ordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[S3Queue-ordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_failed_retry[AzureQueue-unordered-1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_streaming_to_view[unordered-2-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_multiple_tables_meta_mismatch[1-3] FAIL
[with NOT_OK] test_storage_s3_queue/test_0.py::test_delete_after_processing[AzureQueue-unordered-1-3] FAIL

@clickhouse-gh clickhouse-gh bot added the pr-bugfix Pull request with bugfix, not backported by default label Aug 6, 2025
@CheSema CheSema force-pushed the chesema-mv-different-types branch from 6d9ba75 to 4492b00 Compare August 6, 2025 16:45
@CheSema CheSema force-pushed the chesema-mv-different-types branch from 4492b00 to 5a0b536 Compare August 6, 2025 17:09
@CheSema CheSema force-pushed the chesema-mv-different-types branch from 0e2799e to 8bbafe8 Compare August 7, 2025 11:01
broken_dst_table,
mv_name=f"{table_name}_{expect_files_num[0] + 1}_mv",
format="column1 String, column2 JSON",
format="column1 String, column2 Array(UInt32)",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UInt32 is able to cast to JSON

debug_columns(input.getColumnsWithTypeAndName()),
result_metadata->getSampleBlock().dumpStructure(), debug_columns(to_convert));

auto converting_types_dag = ActionsDAG::makeConvertingActions(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the issue was in the order.
It should be

  • casting columns in chunk to the desired types
  • extract subcolumns
  • build default / materialize

@CheSema CheSema marked this pull request as ready for review August 7, 2025 11:06
@Michicosun Michicosun self-assigned this Aug 7, 2025
@CheSema CheSema enabled auto-merge August 7, 2025 18:02
@CheSema CheSema added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Aug 7, 2025
@CheSema CheSema added this pull request to the merge queue Aug 7, 2025
Merged via the queue into master with commit f75c0ed Aug 7, 2025
123 of 124 checks passed
@CheSema CheSema deleted the chesema-mv-different-types branch August 7, 2025 20:13
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 7, 2025
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-backports-created-cloud deprecated label, NOOP pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels Aug 7, 2025
robot-ch-test-poll4 added a commit that referenced this pull request Aug 7, 2025
Cherry pick #85135 to 25.7: ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different
robot-clickhouse added a commit that referenced this pull request Aug 7, 2025
clickhouse-gh bot added a commit that referenced this pull request Aug 7, 2025
Backport #85135 to 25.7: ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different
CheSema added a commit that referenced this pull request Aug 8, 2025
Cherry pick #85135 to 25.6: ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different
robot-clickhouse added a commit that referenced this pull request Aug 8, 2025
@robot-clickhouse robot-clickhouse added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 8, 2025
CheSema added a commit that referenced this pull request Aug 8, 2025
Backport #85135 to 25.6: ILLEGAL_TYPE_OF_ARGUMENT in MV when types are different
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR 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.

5 participants