Skip to content

Show schema for parameterized_view - #90220

Merged
SmitaRKulkarni merged 7 commits into
ClickHouse:masterfrom
GSokol:implement/parameterized_view_explicit_schema
Jan 16, 2026
Merged

SmitaRKulkarni merged 7 commits into
ClickHouse:masterfrom
GSokol:implement/parameterized_view_explicit_schema

Conversation

@GSokol

@GSokol GSokol commented Nov 17, 2025 •

Copy link
Copy Markdown
Contributor

Show the schema of a parameterized view when it's explicitly specified.

Changelog category (leave one):

  • Improvement

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

If the schema of parameterized view is specified explicitly it is shown. Close #88875, #81385

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.1.1.576

@GSokol

GSokol commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

@SmitaRKulkarni, could you please take a look?

Comment thread src/Storages/StorageView.cpp Resolved
@SmitaRKulkarni SmitaRKulkarni self-assigned this Nov 20, 2025
@GSokol

GSokol commented Nov 20, 2025 •

Copy link
Copy Markdown
Contributor Author

@SmitaRKulkarni, I have concerns about the "proper" behavior: right now, if the schema explicitly defined and really returned do not matched -- nothing happens:

CREATE VIEW v_my_number
(
    `n` UInt64,
    `v` String
)
AS SELECT number AS n
FROM numbers({upper_bound:UInt64});

SELECT *
FROM v_my_number(upper_bound = 4);

   ┌─n─┐
1. │ 0 │
2. │ 1 │
3. │ 2 │
4. │ 3 │
   └───┘

Should I keep it, or raise an error instead. Raising an error seams to be more "proper" and "consistent", but:

  1. It is breaking change, so, maybe someone is already using parameterized views with explicit schema, that doesn't match and happy with it.
  2. It could require extra operations on the query executions, slowing them down (a bit, but anyway).

What do you think, which approach is batter?

@SmitaRKulkarni SmitaRKulkarni added the can be tested Allows running workflows for external contributors label Nov 25, 2025
@clickhouse-gh

clickhouse-gh Bot commented Nov 25, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a20033f]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_binary, 4/5) failure
test_storage_s3_queue/test_6.py::test_ordered_mode_with_hive[AzureQueue-4-16-2] FAIL cidb IGNORED
test_userspace_page_cache/test.py::test_size_adjustment FAIL cidb, issue ISSUE EXISTS
Integration tests (arm_binary, distributed plan, 3/4) failure
test_backup_restore_on_cluster/test_disallow_concurrency.py::test_concurrent_backups_on_different_nodes FAIL cidb IGNORED
BuzzHouse (amd_debug) failure
Logical error: 'Inconsistent AST formatting: the query: (STID: 1941-1bfa) FAIL cidb, issue ISSUE EXISTS

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Nov 25, 2025
@SmitaRKulkarni

SmitaRKulkarni commented Nov 25, 2025 •

Copy link
Copy Markdown
Member

@GSokol :

I have concerns about the "proper" behavior: right now, if the schema explicitly defined and really returned do not matched -- nothing happens:

Good point. This should be fixed. Could you please update to raise an error in such case.

It could require extra operations on the query executions, slowing them down (a bit, but anyway).

  • Few extra operations should not be a concern

@GSokol

GSokol commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

Got fever. So, I'm not disappearing,just need couple of days to recover. Next week I push the updates and test for the case.

@GSokol
GSokol force-pushed the implement/parameterized_view_explicit_schema branch from 1b3dd94 to 44b3542 Compare December 4, 2025 08:08
@GSokol

GSokol commented Dec 4, 2025

Copy link
Copy Markdown
Contributor Author

@SmitaRKulkarni, throwing an error on actual and defined schema mismatch.

@GSokol
GSokol force-pushed the implement/parameterized_view_explicit_schema branch from 44b3542 to 8be790a Compare December 9, 2025 11:06
@GSokol
GSokol force-pushed the implement/parameterized_view_explicit_schema branch from de63e7a to 4d47189 Compare December 18, 2025 13:50

@SmitaRKulkarni SmitaRKulkarni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM , lets wait for CI checks

@GSokol

GSokol commented Dec 18, 2025

Copy link
Copy Markdown
Contributor Author

LGTM , lets wait for CI checks

@SmitaRKulkarni, some unrelated tests failed.

@GSokol
GSokol force-pushed the implement/parameterized_view_explicit_schema branch from 4d47189 to a20033f Compare January 8, 2026 09:42
@GSokol
GSokol requested a review from SmitaRKulkarni January 12, 2026 11:26
@SmitaRKulkarni

SmitaRKulkarni commented Jan 16, 2026 •

Copy link
Copy Markdown
Member

Unrelated fails:

Integration tests (amd_binary, 4/5) - test_storage_s3_queue & test_userspace_page_cache
Integration tests (arm_binary, distributed plan, 3/4) - test_backup_restore_on_cluster
BuzzHouse (amd_debug) - 'Logical error: 'Inconsistent AST formatting: the query: (STID: 1941-1bfa)'

@SmitaRKulkarni
SmitaRKulkarni added this pull request to the merge queue Jan 16, 2026
Merged via the queue into ClickHouse:master with commit c191efb Jan 16, 2026
124 of 127 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 16, 2026
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 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.

No information about parameterized view columns is returned.

4 participants