Skip to content

system table improvements#79090

Merged
gingerwizard merged 7 commits intoClickHouse:masterfrom
gingerwizard:misc_issues
Apr 13, 2025
Merged

system table improvements#79090
gingerwizard merged 7 commits intoClickHouse:masterfrom
gingerwizard:misc_issues

Conversation

@gingerwizard
Copy link
Copy Markdown
Collaborator

Addresses questions around system table versions as well as querying across nodes @cwurm

Changelog category (leave one):

  • Documentation (changelog entry is not required)

@gingerwizard gingerwizard added pr-documentation Documentation PRs for the specific code PR can be tested Allows running workflows for external contributors labels Apr 13, 2025
@gingerwizard gingerwizard requested a review from Blargian April 13, 2025 11:25
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Apr 13, 2025

Workflow [PR], commit [6309923]

Copy link
Copy Markdown
Member

@Blargian Blargian left a comment

Choose a reason for hiding this comment

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

LGTM

@gingerwizard gingerwizard enabled auto-merge April 13, 2025 12:25
SELECT
hostname() AS host,
count()
FROM clusterAllReplicas('default', merge('system', 'query_log*'))
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.

This regular expression is incorrect.
It matches query_logggggggggggg and also unquery_log, but not what you thought.

Copy link
Copy Markdown
Collaborator Author

@gingerwizard gingerwizard Apr 13, 2025

Choose a reason for hiding this comment

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

SELECT
    _table,
    hostname() AS host,
    count()
FROM clusterAllReplicas('default', merge('system', 'query_log*'))
WHERE (event_time >= '2025-04-01 00:00:00') AND (event_time <= '2025-04-12 00:00:00')
GROUP BY
    host,
    _table

Query id: b7802cc4-d3e0-4043-b7ce-a7f344029ff2

   ┌─_table──────┬─host──────────────────────────┬─count()─┐
1. │ query_log_1 │ c-ecru-qn-34-server-6em4y4t-015074102. │ query_log_3 │ c-ecru-qn-34-server-s5bnysl-014954103. │ query_log_1 │ c-ecru-qn-34-server-s5bnysl-04281294. │ query_log   │ c-ecru-qn-34-server-iejrkg0-06411555. │ query_log_2 │ c-ecru-qn-34-server-s5bnysl-04339186. │ query_log_2 │ c-ecru-qn-34-server-6em4y4t-014960047. │ query_log_1 │ c-ecru-qn-34-server-iejrkg0-04371328. │ query_log   │ c-ecru-qn-34-server-6em4y4t-06560299. │ query_log   │ c-ecru-qn-34-server-s5bnysl-0650543 │
   └─────────────┴───────────────────────────────┴─────────┘

that matches what i expected

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i can make it '^query_log.*'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

made '^query_log.*'

SELECT
_table,
max(event_time) AS most_recent
FROM merge('system', 'query_log*')
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.

.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

made '^query_log.*'

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.

Just ^query_log

@alexey-milovidov alexey-milovidov self-assigned this Apr 13, 2025
@gingerwizard gingerwizard added this pull request to the merge queue Apr 13, 2025
Merged via the queue into ClickHouse:master with commit f9f8f8a Apr 13, 2025
119 checks passed
@gingerwizard gingerwizard deleted the misc_issues branch April 13, 2025 21:05
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 13, 2025
alexey-milovidov added a commit that referenced this pull request Apr 13, 2025
@alexey-milovidov
Copy link
Copy Markdown
Member

@gingerwizard, I've corrected the mistake here: 64fab30

alexey-milovidov added a commit that referenced this pull request Apr 13, 2025
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-documentation Documentation PRs for the specific code 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.

4 participants