From 5fcb8a06f69bd378cacc0c25f3b908193e75f694 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 18:57:01 +0200 Subject: [PATCH 01/40] Add Vale --- .github/workflows/vale-linter.yml | 48 +++++++++++++++++++++ .vale.ini | 6 +++ scripts/vale_annotations.py | 71 +++++++++++++++++++++++++++++++ scripts/vale_output_template.tmpl | 2 + 4 files changed, 127 insertions(+) create mode 100644 .github/workflows/vale-linter.yml create mode 100644 .vale.ini create mode 100644 scripts/vale_annotations.py create mode 100644 scripts/vale_output_template.tmpl diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml new file mode 100644 index 00000000000..322841d8ea7 --- /dev/null +++ b/.github/workflows/vale-linter.yml @@ -0,0 +1,48 @@ +name: clickhouse-style-review +on: + pull_request: + paths: + - 'docs/*' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + vale: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Python + run: | + curl -Ls https://astral.sh/uv/install.sh | sh + uv python install 3.12 + + - name: Find changed lines + id: changed_lines + uses: hestonhoffman/changed-lines@v1 + with: + file_filter: '.md' + + - name: Run vale on changed files + if: steps.changed_lines.outputs.changed_files + env: + CHANGED_FILES: ${{ steps.changed_Lines.outputs.changed_files }} + run: | + vale --config='.vale.ini' \ + "${CHANGED_FILES}" \ + --output=scripts/vale_output_template.tmpl --no-exit > vale_output.log + + - name: Parse Vale output + if: steps.changed_lines.outputs.changed_files + env: + LINES_CHANGED: ${{ steps.changed_lines.outputs.changed_lines }} + run: | + python local/bin/py/vale/vale_annotations.py --data="${{LINES_CHANGED}}" diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000000..bd82dd4a3ab --- /dev/null +++ b/.vale.ini @@ -0,0 +1,6 @@ +StylesPath = styles + +MinAlertLevel = suggestion + +[*.{md}] +BasedOnStyles = ClickHouse diff --git a/scripts/vale_annotations.py b/scripts/vale_annotations.py new file mode 100644 index 00000000000..6f37cbd116d --- /dev/null +++ b/scripts/vale_annotations.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 + +import json +import argparse +import sys + +def process_data(data): + logs = [] + for line in data.splitlines(): + try: + line_array = (line.split(':', 5)) + logs.append({ + 'Filename': line_array[0], + 'Severity': line_array[3], + 'Check': line_array[4], + 'Line': int(line_array[1]), + 'Col': int(line_array[2]), + 'Message': line_array[5] + }) + except: print('Did not process line: ', line) + return logs + +# Compares the Vale log data to the git data and returns the GitHub annotation +def compare_log(filename_log, log_data): + severity = log_data.get('Severity') + line = log_data.get('Line') + title = log_data.get('Check') + message = log_data.get('Message') + col = log_data.get('Col') + match severity: + case 'suggestion': level = 'notice' + case 'warning': level = 'warning' + case 'error': level = 'error' + if level == 'notice': + message = 'Suggestion: ' + message + + command = f"::file={filename_log},line={line},col={col},title={title}::{message}" + error_present = True if level == 'error' else False + return command, error_present + +if __name__ == '__main__': + log_list = [] + error_list = [] + parser = argparse.ArgumentParser() + parser.add_argument('--data', help='An array of dictionaries mapping a filename to changed lines. ([{filename: [lines_changed]}])', type=str) + args = parser.parse_args() + git_data = json.loads(args.data) + + with open('vale_output.log') as f: + vale_logs = process_data(f.read()) + + if vale_logs: + for entry in vale_logs: + vale_filename = entry['Filename'] + line = entry['Line'] + for git_filename, git_line_data in git_data.items(): + if vale_filename == git_filename and line in git_line_data: + try: + annotation, error_present = compare_log(git_filename, entry) + log_list.append(annotation) + error_list.append(error_present) + except: + raise Exception(f'Failed to parse log entry for {git_filename}') + + for entry in log_list: + print(entry) + + if any(error_list): + print("\nYour PR contains a style error flagged by Vale. " + "Please see comments in your PR.") + sys.exit(1) diff --git a/scripts/vale_output_template.tmpl b/scripts/vale_output_template.tmpl new file mode 100644 index 00000000000..5a18b6e19c0 --- /dev/null +++ b/scripts/vale_output_template.tmpl @@ -0,0 +1,2 @@ +{{range .Files}}{{$file_name := .Path}}{{range .Alerts}}{{$file_name}}:{{.Line}}:{{(index .Span 0)}}:{{.Severity}}:{{.Check}}:{{.Message}} +{{end}}{{end}} \ No newline at end of file From 295f0800355212e7ad78e9a8cf055a2ce4cee1c2 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:05:10 +0200 Subject: [PATCH 02/40] Introduce a change to docs to test --- .github/workflows/vale-linter.yml | 4 ++-- docs/best-practices/json_type.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 322841d8ea7..f1aca7845fd 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -34,7 +34,7 @@ jobs: - name: Run vale on changed files if: steps.changed_lines.outputs.changed_files env: - CHANGED_FILES: ${{ steps.changed_Lines.outputs.changed_files }} + CHANGED_FILES: ${{ steps.changed_lines.outputs.changed_files }} run: | vale --config='.vale.ini' \ "${CHANGED_FILES}" \ @@ -45,4 +45,4 @@ jobs: env: LINES_CHANGED: ${{ steps.changed_lines.outputs.changed_lines }} run: | - python local/bin/py/vale/vale_annotations.py --data="${{LINES_CHANGED}}" + python scripts/vale_annotations.py --data="${{LINES_CHANGED}}" diff --git a/docs/best-practices/json_type.md b/docs/best-practices/json_type.md index 8b292c907b8..dce0809d241 100644 --- a/docs/best-practices/json_type.md +++ b/docs/best-practices/json_type.md @@ -8,7 +8,7 @@ description: 'Page describing when to use JSON' ClickHouse now offers a native JSON column type designed for semi-structured and dynamic data. It's important to clarify that **this is a column type, not a data format**—you can insert JSON into ClickHouse as a string or via supported formats like [JSONEachRow](/docs/interfaces/formats/JSONEachRow), but that does not imply using the JSON column type. Users should only use the JSON type when the structure of their data is dynamic, not when they simply happen to store JSON. -## When to use the JSON type {#when-to-use-the-json-type} +## When To Use the JSON type {#when-to-use-the-json-type} Use the JSON type when your data: From b761e0fcd235651b00db9a4935b762ce3a8f363f Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:10:03 +0200 Subject: [PATCH 03/40] edit workflow --- .github/workflows/trigger-build.yml | 19 ------------------- .github/workflows/vale-linter.yml | 1 + styles/.vale-config/5-MDX.ini | 5 +++++ 3 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/trigger-build.yml create mode 100644 styles/.vale-config/5-MDX.ini diff --git a/.github/workflows/trigger-build.yml b/.github/workflows/trigger-build.yml deleted file mode 100644 index 85781d2366c..00000000000 --- a/.github/workflows/trigger-build.yml +++ /dev/null @@ -1,19 +0,0 @@ -# No longer used - -name: Trigger docs website build -on: - workflow_dispatch: - push: - branches: [main] - -jobs: - build: - name: Dispatch to clickhouse-docs-content - runs-on: ubuntu-latest - steps: - - name: Trigger build of docs website - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.DEPLOY_DOCS_TOKEN }} - repository: clickhouse/clickhouse-docs-content - event-type: build_docs diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index f1aca7845fd..df63cb1e360 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -1,4 +1,5 @@ name: clickhouse-style-review + on: pull_request: paths: diff --git a/styles/.vale-config/5-MDX.ini b/styles/.vale-config/5-MDX.ini new file mode 100644 index 00000000000..02ea72b3858 --- /dev/null +++ b/styles/.vale-config/5-MDX.ini @@ -0,0 +1,5 @@ +[*.mdx] +# Exclude: +# +# - Non-JS inline expressions (which cause Acorn to throw) +TokenIgnores = '({#[^\n}]+})(?!`)' From e38ee13e10e41070f6defb6f406ee487205ec80a Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:11:47 +0200 Subject: [PATCH 04/40] Modify workflow to run on PR for testing --- .github/workflows/vale-linter.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index df63cb1e360..3d85513e251 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -2,8 +2,10 @@ name: clickhouse-style-review on: pull_request: - paths: - - 'docs/*' + types: + - synchronize + - reopened + - opened permissions: contents: read From d60d996a5cf0efff3d44c0cc7c682d87e28229c5 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:19:15 +0200 Subject: [PATCH 05/40] Fix workflow error --- .github/workflows/vale-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 3d85513e251..40399f4839a 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -48,4 +48,4 @@ jobs: env: LINES_CHANGED: ${{ steps.changed_lines.outputs.changed_lines }} run: | - python scripts/vale_annotations.py --data="${{LINES_CHANGED}}" + python scripts/vale_annotations.py --data=${LINES_CHANGED} From 0abfeaf15e0b824aac0e2f3a58d5558a2876b0b6 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:23:54 +0200 Subject: [PATCH 06/40] Install vale --- .github/workflows/vale-linter.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 40399f4839a..17ce8793b9c 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -22,6 +22,12 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false + fetch-depth: 0 + + - name: Install Vale + run: | + sudo snap install vale + vale -v # Verify installation - name: Set up Python run: | From b5bff812d1d1f396282f6a545f8ca3b2b89091be Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:55:22 +0200 Subject: [PATCH 07/40] logic for finding changed lines --- .github/workflows/vale-linter.yml | 48 +++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 17ce8793b9c..90d9d4156ee 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -34,11 +34,49 @@ jobs: curl -Ls https://astral.sh/uv/install.sh | sh uv python install 3.12 - - name: Find changed lines - id: changed_lines - uses: hestonhoffman/changed-lines@v1 - with: - file_filter: '.md' + - name: Generate changed lines JSON report + id: report + run: | + # Create output directory if it doesn't exist + mkdir -p reports + + # Create the JSON report file + echo "{" > reports/changed_lines.json + first_file=true + + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + if [ -f "$file" ]; then + if [ "$first_file" = true ]; then + first_file=false + else + echo "," >> reports/changed_lines.json + fi + + echo " \"$file\": {" >> reports/changed_lines.json + + # Get changed lines for this file + first_line=true + git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- "$file" | + grep -E "^@@" | + sed -E 's/^@@ -[0-9]+(,[0-9]+)? \+([0-9]+)(,[0-9]+)? @@.*$/\2/' | + while read -r line_number; do + if [ "$first_line" = true ]; then + first_line=false + else + echo "," >> reports/changed_lines.json + fi + + content=$(sed -n "${line_number}p" "$file" | sed 's/"/\\"/g') + echo " \"$line_number\": \"$content\"" >> reports/changed_lines.json + done + + echo " }" >> reports/changed_lines.json + fi + done + + echo "}" >> reports/changed_lines.json + echo "Changed lines JSON report generated at reports/changed_lines.json" + cat reports/changed_lines.json - name: Run vale on changed files if: steps.changed_lines.outputs.changed_files From 18eeb9217b464ea09bde60242c91f41b7b5067fc Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:01:01 +0200 Subject: [PATCH 08/40] Changes to changed line step --- .github/workflows/vale-linter.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 90d9d4156ee..47f3d82a4b8 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -1,4 +1,4 @@ -name: clickhouse-style-review +name: Style check on: pull_request: @@ -45,14 +45,15 @@ jobs: first_file=true for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - if [ -f "$file" ]; then + # Only process .md or .mdx files in the docs directory + if [[ "$file" =~ ^docs/.*\.(md|mdx)$ ]] && [ -f "$file" ]; then if [ "$first_file" = true ]; then first_file=false else echo "," >> reports/changed_lines.json fi - echo " \"$file\": {" >> reports/changed_lines.json + echo " \"$file\": [" >> reports/changed_lines.json # Get changed lines for this file first_line=true @@ -66,11 +67,10 @@ jobs: echo "," >> reports/changed_lines.json fi - content=$(sed -n "${line_number}p" "$file" | sed 's/"/\\"/g') - echo " \"$line_number\": \"$content\"" >> reports/changed_lines.json + echo " $line_number" >> reports/changed_lines.json done - echo " }" >> reports/changed_lines.json + echo " ]" >> reports/changed_lines.json fi done From 61364100b1344ac9156b9e08e958eefd81aaf54b Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:39:22 +0200 Subject: [PATCH 09/40] Debugging lines changed step --- .github/workflows/vale-linter.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 47f3d82a4b8..1f2b935ed9d 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -44,8 +44,10 @@ jobs: echo "{" > reports/changed_lines.json first_file=true + echo ${{ steps.changed-files.outputs.all_changed_files }} for file in ${{ steps.changed-files.outputs.all_changed_files }}; do # Only process .md or .mdx files in the docs directory + echo "$file" if [[ "$file" =~ ^docs/.*\.(md|mdx)$ ]] && [ -f "$file" ]; then if [ "$first_file" = true ]; then first_file=false @@ -57,6 +59,7 @@ jobs: # Get changed lines for this file first_line=true + echo git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- "$file" git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- "$file" | grep -E "^@@" | sed -E 's/^@@ -[0-9]+(,[0-9]+)? \+([0-9]+)(,[0-9]+)? @@.*$/\2/' | From 02ff8123c73a6a2b66db4efd8eba37d5e13da8a8 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:43:10 +0200 Subject: [PATCH 10/40] Debug --- .github/workflows/vale-linter.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 1f2b935ed9d..18d7c00ea7e 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -34,21 +34,26 @@ jobs: curl -Ls https://astral.sh/uv/install.sh | sh uv python install 3.12 - - name: Generate changed lines JSON report - id: report + - name: Get changed files and create report run: | - # Create output directory if it doesn't exist + # Create output directory mkdir -p reports - # Create the JSON report file + # Start JSON file echo "{" > reports/changed_lines.json + + # Use git directly to find changed files in docs directory + changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E '^docs/.*\.(md|mdx)$' || echo "") + + echo "Changed files in docs directory:" + echo "$changed_files" + + # Process each file first_file=true + for file in $changed_files; do + if [ -f "$file" ]; then + echo "Processing file: $file" - echo ${{ steps.changed-files.outputs.all_changed_files }} - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - # Only process .md or .mdx files in the docs directory - echo "$file" - if [[ "$file" =~ ^docs/.*\.(md|mdx)$ ]] && [ -f "$file" ]; then if [ "$first_file" = true ]; then first_file=false else @@ -57,13 +62,14 @@ jobs: echo " \"$file\": [" >> reports/changed_lines.json - # Get changed lines for this file + # Get changed lines first_line=true - echo git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- "$file" git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- "$file" | grep -E "^@@" | sed -E 's/^@@ -[0-9]+(,[0-9]+)? \+([0-9]+)(,[0-9]+)? @@.*$/\2/' | while read -r line_number; do + echo "Found changed line $line_number in $file" + if [ "$first_line" = true ]; then first_line=false else @@ -78,7 +84,7 @@ jobs: done echo "}" >> reports/changed_lines.json - echo "Changed lines JSON report generated at reports/changed_lines.json" + echo "Report contents:" cat reports/changed_lines.json - name: Run vale on changed files From 063d2b9f332367652711ba2643c1b9e9e9bb38e1 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:54:33 +0200 Subject: [PATCH 11/40] Modify Run vale on changed files step --- .github/workflows/vale-linter.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 18d7c00ea7e..ab06897a0a5 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -84,17 +84,22 @@ jobs: done echo "}" >> reports/changed_lines.json - echo "Report contents:" - cat reports/changed_lines.json - name: Run vale on changed files - if: steps.changed_lines.outputs.changed_files - env: - CHANGED_FILES: ${{ steps.changed_lines.outputs.changed_files }} run: | + # Extract file names from the JSON report + CHANGED_FILES=$(jq -r 'keys[]' reports/changed_lines.json) + + # Check if we have any files to process + if [ -z "$CHANGED_FILES" ]; then + echo "No changed files to analyze" + exit 0 + fi + vale --config='.vale.ini' \ "${CHANGED_FILES}" \ --output=scripts/vale_output_template.tmpl --no-exit > vale_output.log + cat vale_output.log - name: Parse Vale output if: steps.changed_lines.outputs.changed_files From 7bdcb3209dd1ded14b6b1c9eb20ed852858f8675 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:00:08 +0200 Subject: [PATCH 12/40] set styles path in .vale.ini --- .vale.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/.vale.ini b/.vale.ini index bd82dd4a3ab..606a080a659 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,6 +1,7 @@ StylesPath = styles MinAlertLevel = suggestion +StylesPath = styles/ClickHouse [*.{md}] BasedOnStyles = ClickHouse From 505c62387fe967e4e37289f4e76b257f22ad7721 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:08:27 +0200 Subject: [PATCH 13/40] Fix styles path --- .vale.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vale.ini b/.vale.ini index 606a080a659..9fba029f242 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,7 +1,6 @@ -StylesPath = styles +StylesPath = styles/ClickHouse MinAlertLevel = suggestion -StylesPath = styles/ClickHouse [*.{md}] BasedOnStyles = ClickHouse From a50b566d7dc2b15bdb2a92a5c5b16849e8e544b1 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:16:13 +0200 Subject: [PATCH 14/40] Fix --- .vale.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vale.ini b/.vale.ini index 9fba029f242..3956a8b4fc5 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,4 @@ -StylesPath = styles/ClickHouse - +StylesPath = styles MinAlertLevel = suggestion [*.{md}] From 0b4561a7dcf7c7bf860f5bfdede709dabc663f70 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:38:17 +0200 Subject: [PATCH 15/40] Change to repository checkout --- .github/workflows/vale-linter.yml | 6 ++---- docs/best-practices/json_type.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index ab06897a0a5..ae17adddab3 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -19,10 +19,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - fetch-depth: 0 + - name: Checkout repository + uses: actions/checkout@v3 - name: Install Vale run: | diff --git a/docs/best-practices/json_type.md b/docs/best-practices/json_type.md index dce0809d241..7bd15ce05ad 100644 --- a/docs/best-practices/json_type.md +++ b/docs/best-practices/json_type.md @@ -26,7 +26,7 @@ You can also mix approaches - for example, use static columns for predictable to ## Considerations and tips for using JSON {#considerations-and-tips-for-using-json} -The JSON type enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: +The JSON type uses British spelling of colour enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: * **Specify path types** using [hints in the column definition](/sql-reference/data-types/newjson) to specify types for known sub columns, avoiding unnecessary type inference. * **Skip paths** if you don't need the values, with [SKIP and SKIP REGEXP](/sql-reference/data-types/newjson) to reduce storage and improve performance. From fadb84cb9ef6c08031b5540cb52d6c05bcd48995 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:42:01 +0200 Subject: [PATCH 16/40] changes to checkout step --- .github/workflows/vale-linter.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index ae17adddab3..0bb9163a6c1 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -21,6 +21,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} - name: Install Vale run: | From e8888d01672836829c8ebae2de2bd7863cec1612 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:26:55 +0200 Subject: [PATCH 17/40] Fix checkout --- .github/workflows/vale-linter.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 0bb9163a6c1..ae17adddab3 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -21,9 +21,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: ${{ github.head_ref }} - name: Install Vale run: | From 2d6a425f5accc9824bcc87fa455df752260ac6dc Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:30:04 +0200 Subject: [PATCH 18/40] Fix checkout step --- .github/workflows/vale-linter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index ae17adddab3..a135322a22d 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -21,6 +21,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Install Vale run: | From 69a099f609011d03217315cb8724d9e12b9cbb20 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:34:51 +0200 Subject: [PATCH 19/40] Debug why Vale is not finding our style folder --- .github/workflows/vale-linter.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index a135322a22d..dd7f15ed98b 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -85,6 +85,17 @@ jobs: echo "}" >> reports/changed_lines.json + - name: Debug Vale setup + run: | + # Show current directory structure + find . -type d -name "ClickHouse" -o -name "styles" + + # Show the vale configuration + cat .vale.ini + + # Check Vale's configuration + vale ls-config + - name: Run vale on changed files run: | # Extract file names from the JSON report From 77d0e9162e1ba5fecaf4c7fdec10d9825df8ecd3 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:39:04 +0200 Subject: [PATCH 20/40] Debug why ClickHouse directory is not found within styles --- .github/workflows/vale-linter.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index dd7f15ed98b..61479c51cf6 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -96,6 +96,20 @@ jobs: # Check Vale's configuration vale ls-config + - name: Check styles directory + run: | + echo "Checking styles directory structure:" + ls -la styles/ + + echo "Looking for ClickHouse style:" + if [ -d "styles/ClickHouse" ]; then + echo "✅ ClickHouse style directory found" + ls -la styles/ClickHouse/ + else + echo "❌ ClickHouse style directory NOT found" + find styles/ -type d -maxdepth 2 + fi + - name: Run vale on changed files run: | # Extract file names from the JSON report From 7e05f559b4f893fe2624b9e88d65e0fcf2647ab8 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:18:20 +0200 Subject: [PATCH 21/40] more debugging --- .github/workflows/vale-linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 61479c51cf6..2ca028df96d 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -23,6 +23,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + path: . - name: Install Vale run: | @@ -99,7 +100,7 @@ jobs: - name: Check styles directory run: | echo "Checking styles directory structure:" - ls -la styles/ + ls -la . echo "Looking for ClickHouse style:" if [ -d "styles/ClickHouse" ]; then From b9b22a621188ca03e21e26ab3652a8d1b2a87fb9 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:22:59 +0200 Subject: [PATCH 22/40] Fix issue with styles/ClickHouse not being found --- .gitignore | 2 +- styles/ClickHouse/Ability.yaml | 16 +++ styles/ClickHouse/BadPlurals.yaml | 13 +++ styles/ClickHouse/British.yaml | 121 +++++++++++++++++++++++ styles/ClickHouse/CodeblockFences.yaml | 12 +++ styles/ClickHouse/Colons.yml | 8 ++ styles/ClickHouse/Contractions.yml | 30 ++++++ styles/ClickHouse/CurrentStatus.yaml | 12 +++ styles/ClickHouse/Exclamation.yml | 12 +++ styles/ClickHouse/HeadingPunctuation.yml | 13 +++ styles/ClickHouse/Headings.yml | 30 ++++++ styles/ClickHouse/Quotes.yml | 7 ++ styles/ClickHouse/SentenceLength.yaml | 11 +++ 13 files changed, 286 insertions(+), 1 deletion(-) create mode 100644 styles/ClickHouse/Ability.yaml create mode 100644 styles/ClickHouse/BadPlurals.yaml create mode 100644 styles/ClickHouse/British.yaml create mode 100644 styles/ClickHouse/CodeblockFences.yaml create mode 100644 styles/ClickHouse/Colons.yml create mode 100644 styles/ClickHouse/Contractions.yml create mode 100644 styles/ClickHouse/CurrentStatus.yaml create mode 100644 styles/ClickHouse/Exclamation.yml create mode 100644 styles/ClickHouse/HeadingPunctuation.yml create mode 100644 styles/ClickHouse/Headings.yml create mode 100644 styles/ClickHouse/Quotes.yml create mode 100644 styles/ClickHouse/SentenceLength.yaml diff --git a/.gitignore b/.gitignore index 2299a319c8f..aed9769beb0 100644 --- a/.gitignore +++ b/.gitignore @@ -57,7 +57,7 @@ docs/settings/beta-and-experimental-features.md **.translated **.translate -ClickHouse/ +/ClickHouse/ # Ignore table of contents files diff --git a/styles/ClickHouse/Ability.yaml b/styles/ClickHouse/Ability.yaml new file mode 100644 index 00000000000..2db0dd726b9 --- /dev/null +++ b/styles/ClickHouse/Ability.yaml @@ -0,0 +1,16 @@ +--- +name: gitlab_base.Ability +description: | + Focus on the feature, not the user's capabilities. +extends: existence +message: "Try to replace ('%s') with more precise language, unless this content is about security. See the word list for details." +ignorecase: true +vocab: false +level: suggestion +link: https://docs.gitlab.com/development/documentation/styleguide/word_list/#ability-able +tokens: + - ability to + - ability + - able to + - able + diff --git a/styles/ClickHouse/BadPlurals.yaml b/styles/ClickHouse/BadPlurals.yaml new file mode 100644 index 00000000000..4497d43e97b --- /dev/null +++ b/styles/ClickHouse/BadPlurals.yaml @@ -0,0 +1,13 @@ +--- +name: gitlab_base.BadPlurals +description: | + Don't write plural words with the '(s)' construction. 'HTTP(S)' is acceptable. +extends: existence +message: "Rewrite '%s' to be plural without parentheses." +link: https://docs.gitlab.com/development/documentation/styleguide/word_list/#s +vocab: false +level: warning +ignorecase: true +nonword: true +tokens: + - '(? Date: Fri, 18 Apr 2025 16:08:43 +0200 Subject: [PATCH 23/40] move changed lines logic to own script --- .github/workflows/vale-linter.yml | 63 ++++-------------- scripts/changed_lines_to_json.py | 104 ++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 49 deletions(-) create mode 100644 scripts/changed_lines_to_json.py diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 2ca028df96d..0be5f55cfbd 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -35,56 +35,21 @@ jobs: curl -Ls https://astral.sh/uv/install.sh | sh uv python install 3.12 - - name: Get changed files and create report + - name: Log changed lines run: | - # Create output directory - mkdir -p reports - - # Start JSON file - echo "{" > reports/changed_lines.json - - # Use git directly to find changed files in docs directory - changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E '^docs/.*\.(md|mdx)$' || echo "") - - echo "Changed files in docs directory:" - echo "$changed_files" - - # Process each file - first_file=true - for file in $changed_files; do - if [ -f "$file" ]; then - echo "Processing file: $file" - - if [ "$first_file" = true ]; then - first_file=false - else - echo "," >> reports/changed_lines.json - fi - - echo " \"$file\": [" >> reports/changed_lines.json - - # Get changed lines - first_line=true - git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- "$file" | - grep -E "^@@" | - sed -E 's/^@@ -[0-9]+(,[0-9]+)? \+([0-9]+)(,[0-9]+)? @@.*$/\2/' | - while read -r line_number; do - echo "Found changed line $line_number in $file" - - if [ "$first_line" = true ]; then - first_line=false - else - echo "," >> reports/changed_lines.json - fi - - echo " $line_number" >> reports/changed_lines.json - done - - echo " ]" >> reports/changed_lines.json - fi - done - - echo "}" >> reports/changed_lines.json + # Make sure script is executable + chmod +x scripts/get_changed_lines.py + + # Run the script to get changed lines + python scripts/get_changed_lines.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} + + # Check if the report was created + if [ -f "logs/changed_lines.json" ]; then + echo "Changed lines log generated successfully." + else + echo "Error: Failed to generate changed lines report." + exit 1 + fi - name: Debug Vale setup run: | diff --git a/scripts/changed_lines_to_json.py b/scripts/changed_lines_to_json.py new file mode 100644 index 00000000000..a3cf7bb14d7 --- /dev/null +++ b/scripts/changed_lines_to_json.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 +""" +Script to identify changed lines in Markdown files from a git diff. + +This script finds all changed markdown files in the docs directory +and creates a JSON file showing which lines were modified. + +Usage: + python scripts/get_changed_lines.py + +Output: + Creates a JSON file at logs/changed_lines.json with format: + [ + { + "filename": "docs/path/to/file.md", + "changed_lines": [11, 15, 20] + }, + ... + ] +""" + +import json +import subprocess +import sys +import re +import os +from pathlib import Path + +def get_changed_files(base_sha, head_sha, pattern=r'^docs/.*\.(md|mdx)$'): + """Get list of changed files matching the pattern.""" + try: + cmd = f"git diff --name-only {base_sha} {head_sha}" + result = subprocess.check_output(cmd, shell=True, text=True) + all_files = result.splitlines() + + # Filter files by pattern + changed_files = [f for f in all_files if re.match(pattern, f) and os.path.isfile(f)] + + print(f"Found {len(changed_files)} changed files matching pattern") + return changed_files + except subprocess.CalledProcessError as e: + print(f"Error getting changed files: {e}") + return [] + +def get_changed_lines(file_path, base_sha, head_sha): + """Get line numbers that were changed in a specific file.""" + try: + cmd = f"git diff --unified=0 {base_sha} {head_sha} -- {file_path}" + diff_output = subprocess.check_output(cmd, shell=True, text=True) + + changed_lines = [] + for line in diff_output.splitlines(): + if line.startswith("@@"): + # Extract line number from git diff header + match = re.search(r"^@@ -[0-9]+(?:,[0-9]+)? \+([0-9]+)(?:,[0-9]+)? @@", line) + if match: + line_number = int(match.group(1)) + changed_lines.append(line_number) + + return changed_lines + except subprocess.CalledProcessError as e: + print(f"Error getting changed lines for {file_path}: {e}") + return [] + +def main(): + if len(sys.argv) < 3: + print("Usage: python get_changed_lines.py ") + sys.exit(1) + + base_sha = sys.argv[1] + head_sha = sys.argv[2] + + # Create output directory + Path("logs").mkdir(exist_ok=True) + + # Get changed files + changed_files = get_changed_files(base_sha, head_sha) + + # Process each file + result = [] + for file in changed_files: + print(f"Processing file: {file}") + changed_lines = get_changed_lines(file, base_sha, head_sha) + + if changed_lines: + result.append({ + "filename": file, + "changed_lines": changed_lines + }) + print(f"Found {len(changed_lines)} changed lines in {file}") + + # Write results to JSON file + output_path = "logs/changed_lines.json" + with open(output_path, "w") as f: + json.dump(result, f, indent=2) + + print(f"Generated JSON log at {output_path}") + + # Print the log for debugging + with open(output_path, "r") as f: + print(f.read()) + +if __name__ == "__main__": + main() \ No newline at end of file From 15c680ee253b776b9d5ef6d4cd36faeaab87929e Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 16:17:33 +0200 Subject: [PATCH 24/40] Update the 'Run vale on changed files' step --- .github/workflows/vale-linter.yml | 13 +++++++------ scripts/changed_lines_to_json.py | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 0be5f55cfbd..283af187b34 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -38,10 +38,10 @@ jobs: - name: Log changed lines run: | # Make sure script is executable - chmod +x scripts/get_changed_lines.py + chmod +x scripts/changed_lines_to_json.py # Run the script to get changed lines - python scripts/get_changed_lines.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} + python scripts/changed_lines_to_json.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} # Check if the report was created if [ -f "logs/changed_lines.json" ]; then @@ -79,16 +79,17 @@ jobs: - name: Run vale on changed files run: | # Extract file names from the JSON report - CHANGED_FILES=$(jq -r 'keys[]' reports/changed_lines.json) - + CHANGED_FILES=$(cat reports/changed_lines.json | jq -r '.[].filename' | tr '\n' ' ') + # Check if we have any files to process if [ -z "$CHANGED_FILES" ]; then echo "No changed files to analyze" exit 0 fi - + + echo "Running Vale on: $CHANGED_FILES" vale --config='.vale.ini' \ - "${CHANGED_FILES}" \ + ${CHANGED_FILES} \ --output=scripts/vale_output_template.tmpl --no-exit > vale_output.log cat vale_output.log diff --git a/scripts/changed_lines_to_json.py b/scripts/changed_lines_to_json.py index a3cf7bb14d7..8dbfa804896 100644 --- a/scripts/changed_lines_to_json.py +++ b/scripts/changed_lines_to_json.py @@ -6,7 +6,7 @@ and creates a JSON file showing which lines were modified. Usage: - python scripts/get_changed_lines.py + python scripts/changed_lines_to_json.py Output: Creates a JSON file at logs/changed_lines.json with format: @@ -64,7 +64,7 @@ def get_changed_lines(file_path, base_sha, head_sha): def main(): if len(sys.argv) < 3: - print("Usage: python get_changed_lines.py ") + print("Usage: python changed_lines_to_json.py ") sys.exit(1) base_sha = sys.argv[1] From 7fbf8564a0984bb2c9994892760fb023f1a17c61 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 16:27:49 +0200 Subject: [PATCH 25/40] Fix incorrect path name --- .github/workflows/vale-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 283af187b34..6e5afd56fe1 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -79,7 +79,7 @@ jobs: - name: Run vale on changed files run: | # Extract file names from the JSON report - CHANGED_FILES=$(cat reports/changed_lines.json | jq -r '.[].filename' | tr '\n' ' ') + CHANGED_FILES=$(cat logs/changed_lines.json | jq -r '.[].filename' | tr '\n' ' ') # Check if we have any files to process if [ -z "$CHANGED_FILES" ]; then From 2a7311aa33ab6ff364c2515b64206bfc57540b34 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:02:47 +0200 Subject: [PATCH 26/40] add a test --- .github/workflows/vale-linter.yml | 40 +++------------ scripts/{ => vale}/changed_lines_to_json.py | 0 scripts/vale/test/changed_lines.json | 9 ++++ scripts/vale/test/test.py | 53 ++++++++++++++++++++ scripts/vale/test/vale_output.log | 6 +++ scripts/{ => vale}/vale_annotations.py | 45 +++++++++-------- scripts/{ => vale}/vale_output_template.tmpl | 0 7 files changed, 99 insertions(+), 54 deletions(-) rename scripts/{ => vale}/changed_lines_to_json.py (100%) create mode 100644 scripts/vale/test/changed_lines.json create mode 100644 scripts/vale/test/test.py create mode 100644 scripts/vale/test/vale_output.log rename scripts/{ => vale}/vale_annotations.py (57%) rename scripts/{ => vale}/vale_output_template.tmpl (100%) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index 6e5afd56fe1..e8a0c02c002 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -38,10 +38,10 @@ jobs: - name: Log changed lines run: | # Make sure script is executable - chmod +x scripts/changed_lines_to_json.py + chmod +x scripts/vale/changed_lines_to_json.py # Run the script to get changed lines - python scripts/changed_lines_to_json.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} + python scripts/vale/changed_lines_to_json.py ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} # Check if the report was created if [ -f "logs/changed_lines.json" ]; then @@ -51,31 +51,6 @@ jobs: exit 1 fi - - name: Debug Vale setup - run: | - # Show current directory structure - find . -type d -name "ClickHouse" -o -name "styles" - - # Show the vale configuration - cat .vale.ini - - # Check Vale's configuration - vale ls-config - - - name: Check styles directory - run: | - echo "Checking styles directory structure:" - ls -la . - - echo "Looking for ClickHouse style:" - if [ -d "styles/ClickHouse" ]; then - echo "✅ ClickHouse style directory found" - ls -la styles/ClickHouse/ - else - echo "❌ ClickHouse style directory NOT found" - find styles/ -type d -maxdepth 2 - fi - - name: Run vale on changed files run: | # Extract file names from the JSON report @@ -90,12 +65,13 @@ jobs: echo "Running Vale on: $CHANGED_FILES" vale --config='.vale.ini' \ ${CHANGED_FILES} \ - --output=scripts/vale_output_template.tmpl --no-exit > vale_output.log + --output=scripts/vale/vale_output_template.tmpl --no-exit > vale_output.log cat vale_output.log - name: Parse Vale output - if: steps.changed_lines.outputs.changed_files - env: - LINES_CHANGED: ${{ steps.changed_lines.outputs.changed_lines }} run: | - python scripts/vale_annotations.py --data=${LINES_CHANGED} + # Read the changed_lines.json to get line numbers + CHANGED_LINES=$(cat logs/changed_lines.json) + + # Run the parser script + python scripts/vale/vale_annotations.py --data="${CHANGED_LINES}" diff --git a/scripts/changed_lines_to_json.py b/scripts/vale/changed_lines_to_json.py similarity index 100% rename from scripts/changed_lines_to_json.py rename to scripts/vale/changed_lines_to_json.py diff --git a/scripts/vale/test/changed_lines.json b/scripts/vale/test/changed_lines.json new file mode 100644 index 00000000000..189ecacb71c --- /dev/null +++ b/scripts/vale/test/changed_lines.json @@ -0,0 +1,9 @@ +[ + { + "filename": "docs/best-practices/json_type.md", + "changed_lines": [ + 11, + 29 + ] + } +] \ No newline at end of file diff --git a/scripts/vale/test/test.py b/scripts/vale/test/test.py new file mode 100644 index 00000000000..7e49d0e5eb4 --- /dev/null +++ b/scripts/vale/test/test.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +""" +Test script to run vale_annotations.py with sample data +""" +import os +import sys +import subprocess +import json + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +def main(): + """Run the vale_annotations.py script with sample data""" + # Get paths to files + changed_lines_path = 'changed_lines.json' + vale_output_path = 'vale_output.log' + + # Find script path + script_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + "vale_annotations.py") + + # Make sure the script exists + if not os.path.exists(script_path): + print(f"Error: Script not found at {script_path}") + return + + # Check if the input files exist + if not os.path.exists(changed_lines_path): + print(f"Error: Changed lines file not found at {changed_lines_path}") + return + if not os.path.exists(vale_output_path): + print(f"Error: Vale output file not found at {vale_output_path}") + return + + print(f"Running: {script_path} --git-log-file={changed_lines_path} --vale-log-file={vale_output_path}") + result = subprocess.run( + [sys.executable, script_path, f"--git-log-file={changed_lines_path}", + f"--vale-log-file={vale_output_path}"], + capture_output=True, + text=True + ) + + # Print the output + print("STDOUT:") + print(result.stdout) + + print("STDERR:") + print(result.stderr) + + print(f"Return code: {result.returncode}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/scripts/vale/test/vale_output.log b/scripts/vale/test/vale_output.log new file mode 100644 index 00000000000..82191f68eac --- /dev/null +++ b/scripts/vale/test/vale_output.log @@ -0,0 +1,6 @@ +docs/best-practices/json_type.md:9:312:suggestion:ClickHouse.Contractions:Use 'doesn't' instead of 'does not'. +docs/best-practices/json_type.md:11:4:warning:ClickHouse.Headings:'When To Use the JSON type {#when-to-use-the-json-type}' should use sentence-style capitalization. +docs/best-practices/json_type.md:39:4:warning:ClickHouse.Headings:'Advanced Features {#advanced-features}' should use sentence-style capitalization. +docs/best-practices/json_type.md:41:79:suggestion:ClickHouse.Contractions:Use 'can't' instead of 'cannot'. +docs/best-practices/json_type.md:125:57:suggestion:ClickHouse.Contractions:Use 'it's' instead of 'it is'. +docs/best-practices/json_type.md:125:110:suggestion:ClickHouse.Contractions:Use 'won't' instead of 'will not'. \ No newline at end of file diff --git a/scripts/vale_annotations.py b/scripts/vale/vale_annotations.py similarity index 57% rename from scripts/vale_annotations.py rename to scripts/vale/vale_annotations.py index 6f37cbd116d..b3fdeb04625 100644 --- a/scripts/vale_annotations.py +++ b/scripts/vale/vale_annotations.py @@ -20,43 +20,44 @@ def process_data(data): except: print('Did not process line: ', line) return logs -# Compares the Vale log data to the git data and returns the GitHub annotation -def compare_log(filename_log, log_data): - severity = log_data.get('Severity') - line = log_data.get('Line') - title = log_data.get('Check') - message = log_data.get('Message') - col = log_data.get('Col') - match severity: - case 'suggestion': level = 'notice' - case 'warning': level = 'warning' - case 'error': level = 'error' - if level == 'notice': +# Compares git log data and vale log data and returns the GitHub annotations +def compare_log(git_filename, vale_log): + severity = vale_log.get('Severity') + line = vale_log.get('Line') + column = vale_log.get('Col') + title = vale_log.get('Check') + message = vale_log.get('Message') + if severity == 'suggestion': message = 'Suggestion: ' + message - command = f"::file={filename_log},line={line},col={col},title={title}::{message}" - error_present = True if level == 'error' else False + command = f"::file={git_filename},line={line},col={column},title={title}::{message}" + error_present = True if severity == 'error' else False return command, error_present if __name__ == '__main__': log_list = [] error_list = [] parser = argparse.ArgumentParser() - parser.add_argument('--data', help='An array of dictionaries mapping a filename to changed lines. ([{filename: [lines_changed]}])', type=str) + parser.add_argument('--git-log-file', help='Path to JSON file with changed lines data', type=str) + parser.add_argument('--vale-log-file', help='Path to Vale output log file', type=str) args = parser.parse_args() - git_data = json.loads(args.data) - with open('vale_output.log') as f: + with open(args.git_log_file, 'r') as f: + git_data = json.load(f) + with open(args.vale_log_file, 'r') as f: vale_logs = process_data(f.read()) if vale_logs: - for entry in vale_logs: - vale_filename = entry['Filename'] - line = entry['Line'] - for git_filename, git_line_data in git_data.items(): + for vale_log in vale_logs: + vale_filename = vale_log['Filename'] + line = vale_log['Line'] + + for item in git_data: + git_filename = item['filename'] + git_line_data = item['changed_lines'] if vale_filename == git_filename and line in git_line_data: try: - annotation, error_present = compare_log(git_filename, entry) + annotation, error_present = compare_log(git_filename, vale_log) log_list.append(annotation) error_list.append(error_present) except: diff --git a/scripts/vale_output_template.tmpl b/scripts/vale/vale_output_template.tmpl similarity index 100% rename from scripts/vale_output_template.tmpl rename to scripts/vale/vale_output_template.tmpl From 74475746e647a0f9ef37d5d9a42874006cb9bcac Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:06:23 +0200 Subject: [PATCH 27/40] update workflow --- .github/workflows/vale-linter.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/vale-linter.yml b/.github/workflows/vale-linter.yml index e8a0c02c002..410f59facc5 100644 --- a/.github/workflows/vale-linter.yml +++ b/.github/workflows/vale-linter.yml @@ -65,8 +65,7 @@ jobs: echo "Running Vale on: $CHANGED_FILES" vale --config='.vale.ini' \ ${CHANGED_FILES} \ - --output=scripts/vale/vale_output_template.tmpl --no-exit > vale_output.log - cat vale_output.log + --output=scripts/vale/vale_output_template.tmpl --no-exit > logs/vale_output.log - name: Parse Vale output run: | @@ -74,4 +73,4 @@ jobs: CHANGED_LINES=$(cat logs/changed_lines.json) # Run the parser script - python scripts/vale/vale_annotations.py --data="${CHANGED_LINES}" + python scripts/vale/vale_annotations.py --git-log-file="logs/changed_lines.json" --vale-log-file="logs/vale_output.log" From 6c76b124f63ae9844a6363fdfbc59e503a9fc3b4 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:18:00 +0200 Subject: [PATCH 28/40] Update to use github annotations --- scripts/vale/vale_annotations.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/vale/vale_annotations.py b/scripts/vale/vale_annotations.py index b3fdeb04625..0af8a52bd94 100644 --- a/scripts/vale/vale_annotations.py +++ b/scripts/vale/vale_annotations.py @@ -27,10 +27,15 @@ def compare_log(git_filename, vale_log): column = vale_log.get('Col') title = vale_log.get('Check') message = vale_log.get('Message') - if severity == 'suggestion': + # Convert vale severity to Github annotation level + match severity: + case 'suggestion': level = 'notice' + case 'warning': level = 'warning' + case 'error': level = 'error' + if level == 'notice': message = 'Suggestion: ' + message - command = f"::file={git_filename},line={line},col={column},title={title}::{message}" + command = f"::{level} ::file={git_filename},line={line},col={column},title={title}::{message}" error_present = True if severity == 'error' else False return command, error_present From 719eceefb5ca4bab7329cb28880f6f9245482366 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:35:11 +0200 Subject: [PATCH 29/40] Fix error in annotation --- scripts/vale/vale_annotations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vale/vale_annotations.py b/scripts/vale/vale_annotations.py index 0af8a52bd94..b74c757e66a 100644 --- a/scripts/vale/vale_annotations.py +++ b/scripts/vale/vale_annotations.py @@ -35,7 +35,7 @@ def compare_log(git_filename, vale_log): if level == 'notice': message = 'Suggestion: ' + message - command = f"::{level} ::file={git_filename},line={line},col={column},title={title}::{message}" + command = f"::{level} file={git_filename},line={line},col={column},title={title}::{message}" error_present = True if severity == 'error' else False return command, error_present From f68496e6cd7c52b40ba01278b7ff865983950305 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:23:45 +0200 Subject: [PATCH 30/40] Add check-prose for running vale locally and run it with yarn check-style --- package.json | 5 +- scripts/vale/check-prose.sh | 129 ++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 2 deletions(-) create mode 100755 scripts/vale/check-prose.sh diff --git a/package.json b/package.json index 54877f2b50b..ceab630df57 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,11 @@ "write-heading-ids": "docusaurus write-heading-ids", "run-markdown-linter": "yarn check-markdown", "run-indexer": "bash ./scripts/search/run_indexer.sh", - "check-style": "yarn check-markdown && yarn check-spelling && yarn check-kb", + "check-style": "yarn check-markdown && yarn check-spelling && yarn check-kb && yarn check-prose", "check-spelling": "./scripts/check-doc-aspell", "check-kb": "./scripts/check-kb.sh", - "check-markdown": "./scripts/check-markdown.sh" + "check-markdown": "./scripts/check-markdown.sh", + "check-prose": "./scripts/vale/check-prose.sh" }, "dependencies": { "@clickhouse/click-ui": "^0.0.199", diff --git a/scripts/vale/check-prose.sh b/scripts/vale/check-prose.sh new file mode 100755 index 00000000000..68c1c49cfa1 --- /dev/null +++ b/scripts/vale/check-prose.sh @@ -0,0 +1,129 @@ +#!/bin/bash +# Script to run Vale on locally changed files or specified files +# Usage: +# 1. Run on changed files: ./run_vale_local.sh +# 2. Run on specific files: ./run_vale_local.sh -f "docs/**/*.md" +# 3. Run on list of files: ./run_vale_local.sh -f "docs/file1.md docs/file2.md" + +# Get script directory and repository root +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +# Change to repository root for reliable paths +cd "$REPO_ROOT" + +SCRIPT_NAME=$(basename "$0") + +# Colors for ANSI output formatting +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# Check that Vale is installed +vale -v +if [ $? -eq 1 ] +then + echo "[$SCRIPT_NAME] Error: Vale not found. Please install vale." + exit 1; +else + echo "[$SCRIPT_NAME] Success: Found Vale." +fi + +# Default values +BASE_BRANCH="main" +FILE_PATTERN="" +USE_CHANGED_FILES=true + +# Parse arguments +while [[ $# -gt 0 ]]; do + case "$1" in + -f|--files) + USE_CHANGED_FILES=false + FILE_PATTERN="$2" + shift 2 + ;; + *) + echo -e "${RED}Invalid argument: $1${NC}" + echo "Usage: ./run_vale_local.sh [-f|--files \"file_pattern_or_list\"]" + exit 1 + ;; + esac +done + +if $USE_CHANGED_FILES; then + # Get current branch name + CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + + echo -e "${GREEN}Running Vale check on files changed on $CURRENT_BRANCH branch${NC}" + + # Create logs directory + mkdir -p logs + + # Find the merge-base (common ancestor) of main and current branch + MERGE_BASE=$(git merge-base $BASE_BRANCH $CURRENT_BRANCH) + + # Get changed files between merge-base and current branch + CHANGED_FILES=$(git diff --name-only $MERGE_BASE $CURRENT_BRANCH | grep -E '^docs/.*\.(md|mdx)$' | tr '\n' ' ') + + # Also check for uncommitted changes + UNCOMMITTED_FILES=$(git diff --name-only HEAD | grep -E '^docs/.*\.(md|mdx)$' | tr '\n' ' ') + + # And new untracked files that match our pattern + UNTRACKED_FILES=$(git ls-files --others --exclude-standard | grep -E '^docs/.*\.(md|mdx)$' | tr '\n' ' ') + + # Combine all files and remove duplicates + ALL_FILES="$CHANGED_FILES $UNCOMMITTED_FILES $UNTRACKED_FILES" + UNIQUE_FILES=$(echo "$ALL_FILES" | tr ' ' '\n' | sort | uniq | tr '\n' ' ') + CHANGED_FILES="$UNIQUE_FILES" + + # Check if there are any changed files + if [ -z "$CHANGED_FILES" ]; then + echo -e "${GREEN}No changed files to analyze${NC}" + exit 0 + fi + + echo -e "${YELLOW}Running Vale on changed files: $CHANGED_FILES${NC}" + + # Run Vale on the changed files + vale --config="$REPO_ROOT/.vale.ini" $CHANGED_FILES +else + # Run Vale on the specified files using glob pattern or list + echo -e "${YELLOW}Running Vale on files: $FILE_PATTERN${NC}" + + # Handle the case where multiple files or patterns are specified + if [[ "$FILE_PATTERN" == *"*"* ]]; then + # Contains wildcard, use find to expand + FILES_TO_CHECK=$(find . -type f -path "$FILE_PATTERN" | tr '\n' ' ') + + if [ -z "$FILES_TO_CHECK" ]; then + echo -e "${RED}No files found matching pattern: $FILE_PATTERN${NC}" + exit 1 + fi + + echo -e "${YELLOW}Found files: $FILES_TO_CHECK${NC}" + vale --config="$REPO_ROOT/.vale.ini" $FILES_TO_CHECK + else + # Could be a space-separated list of files or a single file + FILES_TO_CHECK="" + + # Split the input by spaces and check each file/pattern + for file in $FILE_PATTERN; do + if [ -f "$file" ]; then + FILES_TO_CHECK="$FILES_TO_CHECK $file" + else + echo -e "${RED}Warning: File not found: $file${NC}" + fi + done + + if [ -z "$FILES_TO_CHECK" ]; then + echo -e "${RED}No valid files found${NC}" + exit 1 + fi + + echo -e "${YELLOW}Checking files: $FILES_TO_CHECK${NC}" + vale --config="$REPO_ROOT/.vale.ini" $FILES_TO_CHECK + fi +fi + +echo -e "${GREEN}Vale check complete${NC}" From b881e113077accde84c766b9d2048857bd61f364 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:32:38 +0200 Subject: [PATCH 31/40] Add some ClickHouse specific style rules --- styles/ClickHouse/Ability.yaml | 1 - styles/ClickHouse/BackTicksFormats.yaml | 109 ++ styles/ClickHouse/BackTicksFunctions.yaml | 1611 +++++++++++++++++ .../ClickHouse/BackTicksServerSettings.yaml | 204 +++ .../ClickHouse/BackTicksSessionSettings.yaml | 1233 +++++++++++++ styles/ClickHouse/BackTicksTableEngines.yaml | 70 + .../ClickHouse/BackTicksTableFunctions.yaml | 64 + styles/ClickHouse/EOLWhitespace.yaml | 12 + .../{Exclamation.yml => Exclamation.yaml} | 0 styles/ClickHouse/FutureTense.yaml | 15 + ...unctuation.yml => HeadingPunctuation.yaml} | 2 +- .../{Headings.yml => Headings.yaml} | 3 +- styles/ClickHouse/Ordinal.yaml | 7 + styles/ClickHouse/OxfordComma.yaml | 13 + styles/ClickHouse/{Quotes.yml => Quotes.yaml} | 2 +- styles/ClickHouse/Repetition.yaml | 11 + styles/ClickHouse/Units.yaml | 14 + styles/ClickHouse/Uppercase.yaml | 272 +++ styles/ClickHouse/Wordy.yaml | 20 + 19 files changed, 3659 insertions(+), 4 deletions(-) create mode 100644 styles/ClickHouse/BackTicksFormats.yaml create mode 100644 styles/ClickHouse/BackTicksFunctions.yaml create mode 100644 styles/ClickHouse/BackTicksServerSettings.yaml create mode 100644 styles/ClickHouse/BackTicksSessionSettings.yaml create mode 100644 styles/ClickHouse/BackTicksTableEngines.yaml create mode 100644 styles/ClickHouse/BackTicksTableFunctions.yaml create mode 100644 styles/ClickHouse/EOLWhitespace.yaml rename styles/ClickHouse/{Exclamation.yml => Exclamation.yaml} (100%) create mode 100644 styles/ClickHouse/FutureTense.yaml rename styles/ClickHouse/{HeadingPunctuation.yml => HeadingPunctuation.yaml} (95%) rename styles/ClickHouse/{Headings.yml => Headings.yaml} (94%) create mode 100644 styles/ClickHouse/Ordinal.yaml create mode 100644 styles/ClickHouse/OxfordComma.yaml rename styles/ClickHouse/{Quotes.yml => Quotes.yaml} (92%) create mode 100644 styles/ClickHouse/Repetition.yaml create mode 100644 styles/ClickHouse/Units.yaml create mode 100644 styles/ClickHouse/Uppercase.yaml create mode 100644 styles/ClickHouse/Wordy.yaml diff --git a/styles/ClickHouse/Ability.yaml b/styles/ClickHouse/Ability.yaml index 2db0dd726b9..9bfee047f4d 100644 --- a/styles/ClickHouse/Ability.yaml +++ b/styles/ClickHouse/Ability.yaml @@ -13,4 +13,3 @@ tokens: - ability - able to - able - diff --git a/styles/ClickHouse/BackTicksFormats.yaml b/styles/ClickHouse/BackTicksFormats.yaml new file mode 100644 index 00000000000..e18c1ce697a --- /dev/null +++ b/styles/ClickHouse/BackTicksFormats.yaml @@ -0,0 +1,109 @@ +extends: existence +message: "ClickHouse formats '%s' should be enclosed in backticks." +level: suggestion +ignorecase: true +tokens: + -'One' + -'ParquetMetadata' + -'MySQLDump' + -'CapnProto' + -'PostgreSQLWire' + -'TSV' + -'PrettyCompactMonoBlock' + -'JSONEachRowWithProgress' + -'JSONCompactStrings' + -'JSONStringsEachRowWithProgress' + -'Vertical' + -'PrettySpaceNoEscapesMonoBlock' + -'Null' + -'PrettySpaceNoEscapes' + -'Markdown' + -'Form' + -'ODBCDriver2' + -'PrettySpaceMonoBlock' + -'PrettyCompactNoEscapesMonoBlock' + -'PrettyCompactNoEscapes' + -'JSONStringsEachRow' + -'PrettyCompact' + -'Values' + -'PrettyNoEscapesMonoBlock' + -'PrettyNoEscapes' + -'PrettyMonoBlock' + -'AvroConfluent' + -'RawBLOB' + -'Parquet' + -'JSONCompactEachRowWithProgress' + -'CustomSeparatedIgnoreSpacesWithNamesAndTypes' + -'CustomSeparatedIgnoreSpacesWithNames' + -'CustomSeparatedWithNamesAndTypes' + -'PrettySpace' + -'Arrow' + -'JSONAsString' + -'CustomSeparatedWithNames' + -'CustomSeparated' + -'BSONEachRow' + -'Template' + -'XML' + -'ProtobufList' + -'ProtobufSingle' + -'JSONColumnsWithMetadata' + -'TSVRawWithNamesAndTypes' + -'Npy' + -'TemplateIgnoreSpaces' + -'JSONCompactColumns' + -'JSONColumns' + -'ArrowStream' + -'JSONObjectEachRow' + -'NDJSON' + -'PrettyNDJSON' + -'LineAsStringWithNamesAndTypes' + -'PrettyJSONLines' + -'CSVWithNamesAndTypes' + -'ORC' + -'Protobuf' + -'PrettyJSONEachRow' + -'JSONStrings' + -'JSON' + -'RawWithNames' + -'MsgPack' + -'LineAsStringWithNames' + -'JSONCompactStringsEachRowWithProgress' + -'LineAsString' + -'RowBinaryWithNames' + -'RowBinary' + -'SQLInsert' + -'Native' + -'Prometheus' + -'TSVRaw' + -'JSONLines' + -'CustomSeparatedIgnoreSpaces' + -'JSONAsObject' + -'HiveText' + -'RowBinaryWithDefaults' + -'JSONCompactStringsEachRowWithNamesAndTypes' + -'RawWithNamesAndTypes' + -'JSONCompactStringsEachRow' + -'TabSeparatedWithNamesAndTypes' + -'JSONCompactStringsEachRowWithNames' + -'JSONCompactEachRowWithNamesAndTypes' + -'JSONCompactEachRow' + -'TSKV' + -'Avro' + -'JSONEachRow' + -'Pretty' + -'TSVRawWithNames' + -'TabSeparatedRaw' + -'Regexp' + -'TabSeparatedRawWithNamesAndTypes' + -'MySQLWire' + -'CSVWithNames' + -'Raw' + -'TabSeparatedRawWithNames' + -'RowBinaryWithNamesAndTypes' + -'JSONCompact' + -'CSV' + -'JSONCompactEachRowWithNames' + -'TSVWithNamesAndTypes' + -'TabSeparatedWithNames' + -'TabSeparated' + -'TSVWithNames' diff --git a/styles/ClickHouse/BackTicksFunctions.yaml b/styles/ClickHouse/BackTicksFunctions.yaml new file mode 100644 index 00000000000..768e25b5a35 --- /dev/null +++ b/styles/ClickHouse/BackTicksFunctions.yaml @@ -0,0 +1,1611 @@ +extends: existence +message: "ClickHouse function '%s' should be enclosed in backticks." +level: suggestion +ignorecase: true +tokens: + -'trunc' + -'ceil' + -'floor' + -'roundBankers' + -'log2' + -'regionToName' + -'regionIn' + -'regionToArea' + -'regionToCity' + -'cutQueryString' + -'roundDown' + -'UUIDStringToNum' + -'multiFuzzyMatchAnyIndex' + -'blockSerializedSize' + -'generateSerialID' + -'polygonsDistanceCartesian' + -'unbin' + -'unhex' + -'hex' + -'toIntervalHour' + -'toIntervalMinute' + -'toIntervalMillisecond' + -'parseDateTime64BestEffortUSOrZero' + -'parseDateTime64BestEffortUS' + -'parseDateTime64BestEffortOrZero' + -'parseDateTime64BestEffort' + -'parseDateTime32BestEffort' + -'detectProgrammingLanguage' + -'parseDateTimeBestEffortUSOrNull' + -'parseDateTimeBestEffortOrNull' + -'parseDateTimeBestEffortOrZero' + -'toIPv6OrNull' + -'toUUIDOrNull' + -'toDecimal64OrNull' + -'toDecimal32OrNull' + -'toDateTimeOrNull' + -'toDate32OrNull' + -'toDateOrNull' + -'toBFloat16OrNull' + -'toInt128OrNull' + -'UUIDv7ToDateTime' + -'toInt64OrNull' + -'parseDateTimeBestEffortUSOrZero' + -'toInt32OrNull' + -'toUInt128OrNull' + -'toUInt64OrNull' + -'toIPv6OrZero' + -'toDecimal256OrZero' + -'toDecimal64OrZero' + -'toDecimal32OrZero' + -'toDateTimeOrZero' + -'toDate32OrZero' + -'toDateOrZero' + -'toFloat64OrZero' + -'toBFloat16OrZero' + -'toInt128OrZero' + -'toInt8OrZero' + -'toUInt128OrZero' + -'toUInt32OrZero' + -'toIPv6' + -'toIPv4' + -'toDateTime' + -'toDate32' + -'DATE' + -'toDate' + -'toDecimal128' + -'toDecimal32' + -'toFloat64' + -'toFloat32' + -'toBFloat16' + -'toInt128' + -'toInt64' + -'toInt32' + -'toInt16' + -'toUInt256' + -'toUInt64' + -'formatDateTimeInJodaSyntax' + -'bitmapContains' + -'bitmapXor' + -'bitmapOr' + -'bitmapAnd' + -'bitmapAndnotCardinality' + -'bitmapOrCardinality' + -'bitmapAndCardinality' + -'bitmapCardinality' + -'bitmapBuild' + -'h3GetIndexesFromUnidirectionalEdge' + -'alphaTokens' + -'halfMD5' + -'wyHash64' + -'xxHash64' + -'toUInt8OrNull' + -'hiveHash' + -'javaHashUTF16LE' + -'javaHash' + -'metroHash64' + -'farmFingerprint64' + -'regionToTopContinent' + -'cityHash64' + -'addMicroseconds' + -'formatDateTime' + -'sipHash128Keyed' + -'sipHash128' + -'__bitBoolMaskOr' + -'ngramSearchCaseInsensitiveUTF8' + -'ngramSearchCaseInsensitive' + -'ngramDistance' + -'extractAllGroupsVertical' + -'getTypeSerializationStreams' + -'gcd' + -'substringIndex' + -'less' + -'atan' + -'multiSearchAllPositionsCaseInsensitiveUTF8' + -'detectTonality' + -'bitXor' + -'round' + -'hasTokenCaseInsensitiveOrNull' + -'hasTokenCaseInsensitive' + -'geoToH3' + -'intExp10' + -'toInt16OrNull' + -'timeSlots' + -'char' + -'addDays' + -'erf' + -'toIntervalSecond' + -'kostikConsistentHash' + -'proportionsZTest' + -'if' + -'regexpQuoteMeta' + -'toUTCTimestamp' + -'cbrt' + -'JSONExtractKeys' + -'JSONExtractKeysAndValuesRaw' + -'toUInt16OrNull' + -'JSONExtractRaw' + -'JSONExtractString' + -'arrayReduce' + -'JSONExtractUInt' + -'JSONType' + -'bitmapMin' + -'JSONKey' + -'extract' + -'JSONLength' + -'isValidJSON' + -'JSONHas' + -'extractAllGroupsHorizontal' + -'reverse' + -'simpleJSONHas' + -'arrayPartialReverseSort' + -'toHour' + -'arrayPartialSort' + -'bitRotateRight' + -'arrayReverseSort' + -'arraySort' + -'isConstant' + -'toIntervalQuarter' + -'multiSearchAny' + -'pointInEllipses' + -'right' + -'coalesce' + -'intHash64' + -'intHash32' + -'arrayStringConcat' + -'splitByNonAlpha' + -'parseDateTimeBestEffort' + -'toDecimal128OrNull' + -'locate' + -'toInt256' + -'formatReadableDecimalSize' + -'FQDN' + -'lcm' + -'base64URLEncode' + -'jaroWinklerSimilarity' + -'stringJaccardIndexUTF8' + -'stringJaccardIndex' + -'damerauLevenshteinDistance' + -'UUIDToNum' + -'editDistanceUTF8' + -'editDistance' + -'toIPv4OrZero' + -'byteHammingDistance' + -'bitShiftLeft' + -'bitCount' + -'SHA512_256' + -'SHA384' + -'h3Distance' + -'SHA256' + -'MD5' + -'extractGroups' + -'transactionLatestSnapshot' + -'transactionID' + -'polygonsEqualsCartesian' + -'arraySlice' + -'hilbertEncode' + -'arrayJaccardIndex' + -'base64Encode' + -'__actionName' + -'arrayReduceInRanges' + -'polygonsDistanceSpherical' + -'bitHammingDistance' + -'bitRotateLeft' + -'isNaN' + -'intDivOrZero' + -'__bitSwapLastTwo' + -'lowCardinalityKeys' + -'timeSlot' + -'changeMinute' + -'changeDay' + -'changeYear' + -'bitTestAny' + -'bitOr' + -'showCertificate' + -'blockSize' + -'isNotNull' + -'seriesPeriodDetectFFT' + -'leftUTF8' + -'lowCardinalityIndices' + -'bitmapHasAny' + -'generateSnowflakeID' + -'arrayEnumerateUniq' + -'fromModifiedJulianDayOrNull' + -'fromModifiedJulianDay' + -'toIntervalMonth' + -'fromUTCTimestamp' + -'defaultProfiles' + -'enabledProfiles' + -'convertCharset' + -'arrayRandomSample' + -'cosh' + -'countDigits' + -'currentDatabase' + -'hilbertDecode' + -'currentQueryID' + -'exp' + -'replaceRegexpAll' + -'toDayOfMonth' + -'currentRoles' + -'h3ExactEdgeLengthKm' + -'positiveModulo' + -'bitmaskToList' + -'bitmaskToArray' + -'bitPositionsToArray' + -'currentSchemas' + -'currentUser' + -'neighbor' + -'sipHash64Keyed' + -'extractAll' + -'__bitWrapperFunc' + -'lemmatize' + -'dateTrunc' + -'toNullable' + -'formatReadableSize' + -'h3GetResolution' + -'toInt256OrNull' + -'toUInt32' + -'decodeHTMLComponent' + -'fragment' + -'polygonsSymDifferenceSpherical' + -'substringIndexUTF8' + -'polygonsSymDifferenceCartesian' + -'visibleWidth' + -'toFloat32OrNull' + -'h3IndexesAreNeighbors' + -'endsWithUTF8' + -'degrees' + -'exp2' + -'svg' + -'modulo' + -'getOSKernelVersion' + -'bitTest' + -'countSubstringsCaseInsensitive' + -'changeHour' + -'wordShingleMinHashArgCaseInsensitive' + -'wordShingleMinHashArg' + -'ngramMinHashArgUTF8' + -'ngramMinHashArg' + -'wordShingleMinHashCaseInsensitiveUTF8' + -'arrayDifference' + -'wordShingleMinHash' + -'ngramMinHash' + -'formatRowNoNewline' + -'wordShingleSimHashCaseInsensitiveUTF8' + -'wordShingleSimHashUTF8' + -'parseDateTime32BestEffortOrNull' + -'cutToFirstSignificantSubdomainWithWWW' + -'mapApply' + -'wordShingleSimHashCaseInsensitive' + -'finalizeAggregation' + -'ngramSimHashCaseInsensitiveUTF8' + -'ngramSimHash' + -'regionToCountry' + -'generateUUIDv7' + -'toTimezone' + -'notEmpty' + -'tumbleEnd' + -'isInfinite' + -'murmurHash2_32' + -'exp10' + -'replaceRegexpOne' + -'isNull' + -'factorial' + -'parseDateTime' + -'initialQueryStartTime' + -'cutToFirstSignificantSubdomainCustomRFC' + -'dictGetInt16OrDefault' + -'cutToFirstSignificantSubdomainCustom' + -'JSONExtractArrayRaw' + -'atan2' + -'joinGetOrNull' + -'lengthUTF8' + -'aes_decrypt_mysql' + -'position' + -'formatQuerySingleLine' + -'mapAll' + -'overlay' + -'toStartOfMinute' + -'tokens' + -'wordShingleSimHash' + -'arrayCumSum' + -'IPv4StringToNumOrNull' + -'trimLeft' + -'formatReadableQuantity' + -'countMatchesCaseInsensitive' + -'toQuarter' + -'isFinite' + -'countMatches' + -'fromDaysSinceYearZero' + -'arrayWithConstant' + -'toStartOfNanosecond' + -'fromUnixTimestamp64Second' + -'countEqual' + -'JSONArrayLength' + -'timezone' + -'dynamicElement' + -'divide' + -'uniqThetaNot' + -'h3EdgeAngle' + -'acos' + -'fromUnixTimestamp64Micro' + -'cos' + -'windowID' + -'multiMatchAnyIndex' + -'hopStart' + -'dateDiff' + -'hop' + -'ngrams' + -'tumble' + -'hasAny' + -'fuzzBits' + -'formatQuerySingleLineOrNull' + -'randLogNormal' + -'ifNull' + -'generateULID' + -'bar' + -'space' + -'toMillisecond' + -'parseDateTime64InJodaSyntax' + -'generateUUIDv4' + -'formatReadableTimeDelta' + -'geohashEncode' + -'cutToFirstSignificantSubdomainCustomWithWWW' + -'addHours' + -'arrayFill' + -'toFloat32OrZero' + -'bitAnd' + -'dateName' + -'stringToH3' + -'decodeXMLComponent' + -'subtractMicroseconds' + -'parseDateTime64InJodaSyntaxOrNull' + -'getMaxTableNameLengthForDatabase' + -'toDecimal128OrZero' + -'toInt16OrDefault' + -'extractURLParameters' + -'toIPv6OrDefault' + -'toIPv4OrDefault' + -'emptyArrayInt64' + -'arraySum' + -'L2SquaredDistance' + -'toDecimal256OrDefault' + -'SHA224' + -'partitionId' + -'mapSubtract' + -'roundToExp2' + -'toDecimal32OrDefault' + -'addMinutes' + -'toDate32OrDefault' + -'toInt256OrDefault' + -'toInt8OrDefault' + -'__bitBoolMaskAnd' + -'hasSubstr' + -'toUInt64OrDefault' + -'toUInt16OrDefault' + -'shardNum' + -'h3GetFaces' + -'__getScalar' + -'arrayExists' + -'JSONSharedDataPaths' + -'JSONDynamicPathsWithTypes' + -'geoDistance' + -'isIPv4String' + -'JSON_QUERY' + -'greater' + -'gccMurmurHash' + -'reverseUTF8' + -'murmurHash3_64' + -'greaterOrEquals' + -'printf' + -'CRC32' + -'domainWithoutWWWRFC' + -'arrayEnumerateDenseRanked' + -'queryString' + -'getSubcolumn' + -'h3HexAreaM2' + -'toYYYYMMDDhhmmss' + -'h3NumHexagons' + -'reinterpretAsUUID' + -'simpleJSONExtractFloat' + -'h3EdgeLengthM' + -'arrayRotateLeft' + -'toDateTimeOrDefault' + -'changeMonth' + -'cutToFirstSignificantSubdomainWithWWWRFC' + -'intDiv' + -'dateTimeToSnowflake' + -'domain' + -'cutToFirstSignificantSubdomain' + -'getMacro' + -'toYear' + -'log' + -'errorCodeToName' + -'endsWith' + -'rand64' + -'h3GetDestinationIndexFromUnidirectionalEdge' + -'roundDuration' + -'URLPathHierarchy' + -'h3HexRing' + -'h3GetUnidirectionalEdgesFromHexagon' + -'simpleJSONExtractUInt' + -'dictGetUInt16OrDefault' + -'h3IsPentagon' + -'ngramMinHashUTF8' + -'compareSubstrings' + -'plus' + -'readWKTMultiPolygon' + -'subtractYears' + -'detectLanguageMixed' + -'acosh' + -'arrayPushBack' + -'accurateCastOrDefault' + -'domainWithoutWWW' + -'hasSubsequenceCaseInsensitive' + -'ngramSearchUTF8' + -'JSONExtractBool' + -'tupleHammingDistance' + -'h3ExactEdgeLengthRads' + -'dictGetDateTime' + -'h3ToGeoBoundary' + -'arrayShiftRight' + -'h3ToString' + -'arrayRotateRight' + -'hasSubsequence' + -'JSON_VALUE' + -'JSONExtract' + -'tumbleStart' + -'bitShiftRight' + -'today' + -'tryBase58Decode' + -'flattenTuple' + -'polygonsWithinSpherical' + -'tryPunycodeDecode' + -'L2Normalize' + -'YYYYMMDDhhmmssToDateTime64' + -'pow' + -'geohashesInBox' + -'hasSubsequenceUTF8' + -'rightPadUTF8' + -'rightPad' + -'aes_encrypt_mysql' + -'hasTokenOrNull' + -'dictGetUUIDOrDefault' + -'hasToken' + -'idnaEncode' + -'tan' + -'substring' + -'identity' + -'regionHierarchy' + -'toDateTime64OrNull' + -'polygonsWithinCartesian' + -'materialize' + -'toDecimalString' + -'idnaDecode' + -'SHA512' + -'notLike' + -'shardCount' + -'geohashDecode' + -'tryIdnaEncode' + -'readWKTMultiLineString' + -'ignore' + -'h3GetUnidirectionalEdgeBoundary' + -'globalNullInIgnoreSet' + -'fromDaysSinceYearZero32' + -'globalNotInIgnoreSet' + -'splitByChar' + -'toRelativeDayNum' + -'notInIgnoreSet' + -'globalInIgnoreSet' + -'arrayConcat' + -'globalNotNullIn' + -'sqrt' + -'notNullIn' + -'globalNullIn' + -'nullIn' + -'dictGetHierarchy' + -'globalIn' + -'indexHint' + -'toDateTime32' + -'arraySplit' + -'initcapUTF8' + -'queryID' + -'appendTrailingCharIfAbsent' + -'negate' + -'structureToProtobufSchema' + -'polygonAreaSpherical' + -'base58Encode' + -'ngramDistanceCaseInsensitive' + -'connectionId' + -'startsWith' + -'initialQueryID' + -'murmurHash2_64' + -'parseReadableSizeOrNull' + -'h3GetBaseCell' + -'bitmapHasAll' + -'base58Decode' + -'isIPAddressInRange' + -'JSON_EXISTS' + -'dictGetDescendants' + -'dictGetChildren' + -'dictIsIn' + -'dictGetStringOrDefault' + -'evalMLMethod' + -'dictGetIPv6OrDefault' + -'_CAST' + -'dictGetIPv4OrDefault' + -'UTCTimestamp' + -'dictGetFloat64OrDefault' + -'s2RectAdd' + -'dictGetFloat32OrDefault' + -'keccak256' + -'dictGetInt64OrDefault' + -'hasAll' + -'bitTestAll' + -'normalizedQueryHash' + -'dictGetInt32OrDefault' + -'globalNotIn' + -'dateTime64ToSnowflake' + -'dictGetInt8OrDefault' + -'wordShingleMinHashCaseInsensitive' + -'dictGetDateOrDefault' + -'dictGetUInt64OrDefault' + -'dictGetUInt32OrDefault' + -'h3ExactEdgeLengthM' + -'countSubstringsCaseInsensitiveUTF8' + -'dictGetString' + -'dictGetIPv6' + -'multiSearchFirstPosition' + -'dictGetDate' + -'YYYYMMDDToDate32' + -'reinterpretAsInt32' + -'dictGetFloat64' + -'greatCircleAngle' + -'IPv6StringToNum' + -'dictGetInt64' + -'min2' + -'dictGetInt16' + -'isValidUTF8' + -'h3PointDistKm' + -'dictGetInt8' + -'dictGetUInt64' + -'dictGetUInt32' + -'dictGetAll' + -'h3GetPentagonIndexes' + -'emptyArrayInt16' + -'replaceOne' + -'dictGetOrDefault' + -'isNotDistinctFrom' + -'addWeeks' + -'lgamma' + -'h3PointDistM' + -'runningDifferenceStartingWithFirstValue' + -'h3CellAreaM2' + -'normalizeUTF8NFC' + -'like' + -'cosineDistance' + -'extractURLParameterNames' + -'LinfNormalize' + -'toIntervalMicrosecond' + -'L1Normalize' + -'toIntervalNanosecond' + -'addDate' + -'tupleIntDivOrZero' + -'LpDistance' + -'LinfDistance' + -'JSONSharedDataPathsWithTypes' + -'dictHas' + -'L1Distance' + -'getSetting' + -'LpNorm' + -'toYYYYMM' + -'L2Norm' + -'readWKTRing' + -'caseWithExpression' + -'extractTextFromHTML' + -'L1Norm' + -'fromUnixTimestamp64Milli' + -'addSeconds' + -'tupleIntDivOrZeroByNumber' + -'toUnixTimestamp' + -'clamp' + -'h3GetRes0Indexes' + -'tupleIntDivByNumber' + -'h3ToCenterChild' + -'dictGetFloat32' + -'tupleModuloByNumber' + -'ngramSimHashUTF8' + -'emptyArrayUInt8' + -'dictGetUInt8' + -'subtractTupleOfIntervals' + -'toInt128OrDefault' + -'addTupleOfIntervals' + -'__scalarSubqueryResult' + -'tupleDivide' + -'tupleMultiply' + -'least' + -'tupleMinus' + -'JSONAllPathsWithTypes' + -'log10' + -'lower' + -'hasSubsequenceCaseInsensitiveUTF8' + -'pi' + -'randCanonical' + -'lowerUTF8' + -'YYYYMMDDToDate' + -'subDate' + -'ngramMinHashCaseInsensitiveUTF8' + -'makeDateTime64' + -'regionToContinent' + -'makeDate32' + -'makeDate' + -'filesystemUnreserved' + -'bitNot' + -'CRC64' + -'JSONDynamicPaths' + -'has' + -'leftPad' + -'reinterpretAsDate' + -'filesystemAvailable' + -'firstLine' + -'currentProfiles' + -'CAST' + -'mapUpdate' + -'match' + -'JSONExtractInt' + -'subtractMonths' + -'toUUIDOrZero' + -'h3GetUnidirectionalEdge' + -'log1p' + -'isZeroOrNull' + -'leftPadUTF8' + -'toUInt8OrDefault' + -'notILike' + -'toDateTime64OrDefault' + -'concatWithSeparatorAssumeInjective' + -'concatWithSeparator' + -'monthName' + -'dictGetInt32' + -'mortonEncode' + -'toTypeName' + -'polygonsUnionCartesian' + -'toDaysSinceYearZero' + -'reinterpretAsUInt16' + -'arraySymmetricDifference' + -'addYears' + -'toStartOfSecond' + -'enabledRoles' + -'concat' + -'mapAdd' + -'ngramSearch' + -'fromUnixTimestamp64Nano' + -'lessOrEquals' + -'subtractQuarters' + -'addMilliseconds' + -'multiSearchFirstPositionUTF8' + -'encrypt' + -'arrayUnion' + -'multiSearchAllPositions' + -'toUInt16' + -'upper' + -'arrayFlatten' + -'tupleIntDiv' + -'toInt256OrZero' + -'pointInPolygon' + -'splitByWhitespace' + -'countSubstrings' + -'parseDateTimeOrZero' + -'reinterpretAsFloat64' + -'s2GetNeighbors' + -'multiSearchAnyCaseInsensitive' + -'ascii' + -'bitmapMax' + -'ngramDistanceCaseInsensitiveUTF8' + -'h3GetOriginIndexFromUnidirectionalEdge' + -'parseDateTime32BestEffortOrZero' + -'blockNumber' + -'rightUTF8' + -'cutURLParameter' + -'positionCaseInsensitiveUTF8' + -'multiSearchFirstPositionCaseInsensitive' + -'indexOf' + -'emptyArrayString' + -'tryBase64URLDecode' + -'h3IsValid' + -'emptyArrayUInt32' + -'concatAssumeInjective' + -'toStartOfHour' + -'isDecimalOverflow' + -'sinh' + -'toModifiedJulianDayOrNull' + -'multiplyDecimal' + -'normalizeQuery' + -'randExponential' + -'randomString' + -'normalizeUTF8NFKD' + -'toUnixTimestamp64Milli' + -'firstSignificantSubdomainCustom' + -'simpleJSONExtractBool' + -'normalizeUTF8NFKC' + -'multiSearchFirstIndexCaseInsensitiveUTF8' + -'normalizeUTF8NFD' + -'toDateTime64OrZero' + -'tid' + -'port' + -'subtractSeconds' + -'ifNotFinite' + -'bitmapSubsetInRange' + -'nullIf' + -'toDecimal256OrNull' + -'multiMatchAny' + -'parseDateTime64OrNull' + -'extractKeyValuePairsWithEscaping' + -'parseDateTime64OrZero' + -'snowflakeToDateTime64' + -'parseDateTimeOrNull' + -'cutToFirstSignificantSubdomainCustomWithWWWRFC' + -'empty' + -'dotProduct' + -'emptyArrayUInt16' + -'parseReadableSizeOrZero' + -'parseReadableSize' + -'parseTimeDelta' + -'tupleMultiplyByNumber' + -'mapFromArrays' + -'randomStringUTF8' + -'max2' + -'stem' + -'subtractMinutes' + -'e' + -'arrayProduct' + -'polygonsIntersectionSpherical' + -'wkt' + -'soundex' + -'polygonPerimeterSpherical' + -'polygonsIntersectionCartesian' + -'h3PointDistRads' + -'polygonsUnionSpherical' + -'greatCircleDistance' + -'bitmapAndnot' + -'bitmapXorCardinality' + -'IPv6StringToNumOrDefault' + -'tryDecrypt' + -'toInt32OrZero' + -'randStudentT' + -'IPv6NumToString' + -'byteSize' + -'IPv4StringToNum' + -'positionUTF8' + -'MACStringToNum' + -'UUIDNumToString' + -'IPv4StringToNumOrDefault' + -'IPv4CIDRToRange' + -'MACStringToOUI' + -'subtractHours' + -'geoToS2' + -'MACNumToString' + -'cutToFirstSignificantSubdomainRFC' + -'wordShingleMinHashUTF8' + -'toBool' + -'radians' + -'reinterpretAsUInt64' + -'erfc' + -'hopEnd' + -'map' + -'rand' + -'toMonthNumSinceEpoch' + -'minSampleSizeContinuous' + -'tgamma' + -'multiSearchAllPositionsCaseInsensitive' + -'randConstant' + -'randPoisson' + -'nowInBlock' + -'randNegativeBinomial' + -'toUnixTimestamp64Micro' + -'randBinomial' + -'splitByRegexp' + -'mapContains' + -'randBernoulli' + -'sipHash64' + -'catboostEvaluate' + -'randNormal' + -'arrayReverseFill' + -'in' + -'ngramMinHashArgCaseInsensitiveUTF8' + -'pathFull' + -'xxh3' + -'trimBoth' + -'normalizeQueryKeepNames' + -'toDateTime64' + -'initializeAggregation' + -'yesterday' + -'wordShingleMinHashArgUTF8' + -'variantElement' + -'asinh' + -'randUniform' + -'randomFixedString' + -'globalNotNullInIgnoreSet' + -'toUInt64OrZero' + -'dictGetUInt16' + -'parseDateTime64InJodaSyntaxOrZero' + -'YYYYMMDDhhmmssToDateTime' + -'readWKTPolygon' + -'arrayShiftLeft' + -'netloc' + -'regionToDistrict' + -'reinterpret' + -'reinterpretAsFixedString' + -'reinterpretAsString' + -'sipHash128ReferenceKeyed' + -'mapPartialSort' + -'toLastDayOfMonth' + -'randomPrintableASCII' + -'snowflakeToDateTime' + -'notEquals' + -'left' + -'reinterpretAsDateTime' + -'toIntervalDay' + -'reinterpretAsFloat32' + -'parseDateTime64' + -'reinterpretAsInt256' + -'mortonDecode' + -'subBitmap' + -'decrypt' + -'base64Decode' + -'defaultValueOfArgumentType' + -'h3ToChildren' + -'emptyArrayToSingle' + -'reinterpretAsInt128' + -'JSONAllPaths' + -'toStartOfMillisecond' + -'reinterpretAsInt64' + -'reinterpretAsInt16' + -'normalizedQueryHashKeepNames' + -'toUInt256OrZero' + -'tupleModulo' + -'toStringCutToZero' + -'toUInt8OrZero' + -'not' + -'reinterpretAsInt8' + -'fromUnixTimestamp' + -'LinfNorm' + -'reinterpretAsUInt8' + -'toUInt8' + -'range' + -'kafkaMurmurHash' + -'notIn' + -'dictGetUInt8OrDefault' + -'arrayIntersect' + -'subtractDays' + -'ngramSimHashCaseInsensitive' + -'repeat' + -'JSONExtractKeysAndValues' + -'extractKeyValuePairs' + -'replicate' + -'formatRow' + -'detectLanguage' + -'tupleElement' + -'roundAge' + -'s2CapUnion' + -'reinterpretAsUInt256' + -'ngramDistanceUTF8' + -'s2RectUnion' + -'s2ToGeo' + -'trimRight' + -'formatQueryOrNull' + -'translate' + -'seriesDecomposeSTL' + -'sipHash128Reference' + -'seriesOutliersDetectTukey' + -'ngramMinHashCaseInsensitive' + -'randFisherF' + -'firstSignificantSubdomainCustomRFC' + -'serverUUID' + -'hostName' + -'toUInt256OrDefault' + -'L2SquaredNorm' + -'mapPartialReverseSort' + -'toJSONString' + -'uptime' + -'extractURLParameter' + -'zookeeperSessionUptime' + -'jumpConsistentHash' + -'minSampleSizeConversion' + -'getClientHTTPHeader' + -'displayName' + -'sigmoid' + -'sign' + -'sin' + -'intExp2' + -'toYearNumSinceEpoch' + -'getServerPort' + -'runningDifference' + -'sleepEachRow' + -'sleep' + -'farmHash64' + -'snowflakeIDToDateTime64' + -'emptyArrayDate' + -'CRC32IEEE' + -'IPv4NumToStringClassC' + -'polygonConvexHullCartesian' + -'murmurHash3_32' + -'arrayElementOrNull' + -'toInt16OrZero' + -'toWeek' + -'reinterpretAsUInt32' + -'base64URLDecode' + -'arrayDotProduct' + -'punycodeEncode' + -'arrayElement' + -'RIPEMD160' + -'sqidDecode' + -'arrayReverseSplit' + -'transactionOldestSnapshot' + -'dumpColumnStructure' + -'multiSearchFirstIndex' + -'arrayPopFront' + -'subtractMilliseconds' + -'snowflakeIDToDateTime' + -'protocol' + -'multiSearchAllPositionsUTF8' + -'toFixedString' + -'toYearWeek' + -'toInt8' + -'s2RectContains' + -'equals' + -'simpleJSONExtractInt' + -'toLastDayOfWeek' + -'synonyms' + -'ULIDStringToDateTime' + -'addNanoseconds' + -'timestamp' + -'toDayOfWeek' + -'randChiSquared' + -'toStartOfYear' + -'demangle' + -'abs' + -'toValidUTF8' + -'emptyArrayFloat32' + -'toUInt32OrDefault' + -'bin' + -'toDayOfYear' + -'toDecimal256' + -'asin' + -'h3Line' + -'multiSearchFirstPositionCaseInsensitiveUTF8' + -'cutFragment' + -'arrayCompact' + -'mapSort' + -'h3CellAreaRads2' + -'arrayAUCPR' + -'SHA1' + -'toModifiedJulianDay' + -'toMonth' + -'greatest' + -'toRelativeMinuteNum' + -'hypot' + -'initcap' + -'dictGetDateTimeOrDefault' + -'file' + -'toRelativeMonthNum' + -'multiFuzzyMatchAny' + -'toStartOfWeek' + -'emptyArrayFloat64' + -'multiSearchAnyUTF8' + -'age' + -'mapConcat' + -'toUInt128OrDefault' + -'subtractNanoseconds' + -'queryStringAndFragment' + -'multiFuzzyMatchAllIndices' + -'IPv6CIDRToRange' + -'emptyArrayInt32' + -'array' + -'simpleJSONExtractString' + -'toUInt128' + -'emptyArrayUInt64' + -'mapKeys' + -'arrayEnumerate' + -'tupleNegate' + -'toRelativeQuarterNum' + -'widthBucket' + -'logTrace' + -'minus' + -'toIntervalWeek' + -'replaceAll' + -'toUnixTimestamp64Second' + -'toRelativeSecondNum' + -'bitmapToArray' + -'arrayMax' + -'toRelativeYearNum' + -'LpNormalize' + -'toStartOfDay' + -'toYYYYMMDD' + -'toStartOfFifteenMinutes' + -'topLevelDomain' + -'isIPv6String' + -'toRelativeWeekNum' + -'arrayROCAUC' + -'toStartOfFiveMinutes' + -'IPv4ToIPv6' + -'toStartOfMicrosecond' + -'reinterpretAsUInt128' + -'regionToPopulation' + -'toInt8OrNull' + -'format' + -'toStartOfISOYear' + -'toFloat32OrDefault' + -'arrayDistinct' + -'toDecimal128OrDefault' + -'byteSwap' + -'arrayCount' + -'hasColumnInTable' + -'toRelativeHourNum' + -'joinGet' + -'multiSearchAnyCaseInsensitiveUTF8' + -'upperUTF8' + -'validateNestedArraySizes' + -'toStartOfInterval' + -'toStartOfMonth' + -'toStartOfQuarter' + -'xxHash32' + -'dateTimeToSnowflakeID' + -'mapFilter' + -'assumeNotNull' + -'changeSecond' + -'dateTime64ToSnowflakeID' + -'toTime' + -'structureToCapnProtoSchema' + -'variantType' + -'mapExtractKeyLike' + -'overlayUTF8' + -'tanh' + -'s2RectIntersection' + -'timeDiff' + -'mapContainsKeyLike' + -'murmurHash3_128' + -'polygonPerimeterCartesian' + -'runningAccumulate' + -'L2Distance' + -'decodeURLFormComponent' + -'mapReverseSort' + -'h3EdgeLengthKm' + -'parseDateTime64BestEffortUSOrNull' + -'moduloLegacy' + -'h3kRing' + -'dictGetOrNull' + -'arrayShingles' + -'inIgnoreSet' + -'dictGetUUID' + -'notNullInIgnoreSet' + -'mapValues' + -'isDynamicElementInSharedData' + -'encodeXMLComponent' + -'tcpPort' + -'BLAKE3' + -'toMinute' + -'timezoneOffset' + -'transform' + -'arrayResize' + -'IPv6StringToNumOrNull' + -'subtractWeeks' + -'tupleConcat' + -'toFloat64OrDefault' + -'toUUID' + -'arrayLast' + -'MD4' + -'moduloOrZero' + -'s2CapContains' + -'defaultValueOfTypeName' + -'tuplePlus' + -'IPv4NumToString' + -'readWKTPoint' + -'firstSignificantSubdomain' + -'h3HexAreaKm2' + -'toUnixTimestamp64Nano' + -'path' + -'now' + -'toInt32OrDefault' + -'arrayCumSumNonNegative' + -'detectCharset' + -'dynamicType' + -'translateUTF8' + -'emptyArrayInt8' + -'parseDateTimeInJodaSyntax' + -'formatQuery' + -'tupleToNameValuePairs' + -'simpleJSONExtractRaw' + -'accurateCastOrNull' + -'length' + -'h3ToGeo' + -'arrayEnumerateDense' + -'parseDateTime64BestEffortOrNull' + -'domainRFC' + -'bitmapSubsetLimit' + -'mapExists' + -'arrayNormalizedGini' + -'rowNumberInAllBlocks' + -'multiSearchFirstIndexCaseInsensitive' + -'JSONExtractFloat' + -'tuple' + -'atanh' + -'kql_array_sort_desc' + -'bitmapTransform' + -'revision' + -'cutIPv6' + -'arrayShuffle' + -'generateRandomStructure' + -'isNullable' + -'regexpExtract' + -'sqidEncode' + -'toColumnTypeName' + -'toMonday' + -'fromUnixTimestampInJodaSyntax' + -'arrayFold' + -'arrayMin' + -'basename' + -'toISOWeek' + -'toUInt32OrNull' + -'accurateCast' + -'kql_array_sort_asc' + -'h3ToParent' + -'makeDateTime' + -'getSizeOfEnumType' + -'encodeURLFormComponent' + -'toUUIDOrDefault' + -'arrayAvg' + -'arrayPopBack' + -'arrayReverse' + -'icebergTruncate' + -'toDecimal64' + -'now64' + -'tupleNames' + -'toInt64OrZero' + -'arrayAll' + -'addMonths' + -'URLHash' + -'topLevelDomainRFC' + -'arrayLastIndex' + -'bitSlice' + -'firstSignificantSubdomainRFC' + -'parseDateTimeInJodaSyntaxOrZero' + -'startsWithUTF8' + -'portRFC' + -'decodeURLComponent' + -'arrayLastOrNull' + -'timezoneOf' + -'tupleDivideByNumber' + -'toUInt16OrZero' + -'toString' + -'emptyArrayDateTime' + -'indexOfAssumeSorted' + -'xor' + -'arrayEnumerateUniqRanked' + -'or' + -'arrayPushFront' + -'arrayMap' + -'arrayPartialShuffle' + -'arrayFirstIndex' + -'multiSearchFirstIndexUTF8' + -'parseDateTimeBestEffortUS' + -'mapPopulateSeries' + -'toDecimal64OrDefault' + -'divideDecimal' + -'globalVariable' + -'dictGetIPv4' + -'tryBase64Decode' + -'throwIf' + -'detectLanguageUnknown' + -'and' + -'uniqThetaIntersect' + -'ilike' + -'arrayJoin' + -'addQuarters' + -'multiply' + -'toStartOfTenMinutes' + -'nullInIgnoreSet' + -'arrayZipUnaligned' + -'cutWWW' + -'dictGet' + -'toLowCardinality' + -'runningConcurrency' + -'toDateOrDefault' + -'ngramMinHashArgCaseInsensitive' + -'getSettingOrDefault' + -'uniqThetaUnion' + -'wordShingleMinHashArgCaseInsensitiveUTF8' + -'encodeURLComponent' + -'URLHierarchy' + -'version' + -'toFloat64OrNull' + -'arrayZip' + -'subtractInterval' + -'defaultRoles' + -'arrayFilter' + -'multiIf' + -'h3UnidirectionalEdgeIsValid' + -'serverTimezone' + -'substringUTF8' + -'JSONMergePatch' + -'arrayFirst' + -'toIntervalYear' + -'addInterval' + -'polygonAreaCartesian' + -'arrayUniq' + -'toISOYear' + -'toInt64OrDefault' + -'s2CellsIntersect' + -'rowNumberInBlock' + -'splitByString' + -'parseDateTimeInJodaSyntaxOrNull' + -'multiMatchAllIndices' + -'hasThreadFuzzer' + -'nested' + -'punycodeDecode' + -'toIPv4OrNull' + -'readWKTLineString' + -'jaroSimilarity' + -'h3IsResClassIII' + -'cutQueryStringAndFragment' + -'toUInt256OrNull' + -'arrayFirstOrNull' + -'positionCaseInsensitive' + -'filesystemCapacity' + -'toSecond' + -'truncate' + -'ceiling' + -'FROM_UNIXTIME' + -'splitByAlpha' + -'HOUR' + -'SUBSTRING_INDEX' + -'LAST_DAY' + -'fullHostName' + -'mapFromString' + -'str_to_map' + -'levenshteinDistanceUTF8' + -'levenshteinDistance' + -'mismatches' + -'SVG' + -'connection_id' + -'SCHEMA' + -'REGEXP_REPLACE' + -'DAY' + -'pmod' + -'replace' + -'DATE_TRUNC' + -'visitParamExtractFloat' + -'TIMESTAMP_DIFF' + -'visitParamHas' + -'timeZoneOffset' + -'timestamp_diff' + -'distanceL2' + -'lcase' + -'DATE_DIFF' + -'time_bucket' + -'rand32' + -'date_diff' + -'timestampDiff' + -'toTimeZone' + -'timeZone' + -'INET6_NTOA' + -'JSON_ARRAY_LENGTH' + -'initial_query_start_time' + -'CHAR_LENGTH' + -'caseWithExpr' + -'byteSlice' + -'mid' + -'curdate' + -'current_date' + -'date_bin' + -'MILLISECOND' + -'minSampleSizeContinous' + -'power' + -'rpad' + -'SECOND' + -'normalizeLinf' + -'initial_query_id' + -'normalizeL2' + -'current_query_id' + -'REGEXP_EXTRACT' + -'normalizeL1' + -'CHARACTER_LENGTH' + -'substr' + -'distanceLinf' + -'partitionID' + -'distanceL2Squared' + -'TO_BASE64' + -'normL1' + -'yandexConsistentHash' + -'scalarProduct' + -'DAYOFMONTH' + -'vectorDifference' + -'vectorSum' + -'positive_modulo' + -'MAP_FROM_ARRAYS' + -'caseWithoutExpression' + -'concat_ws' + -'FROM_BASE64' + -'extractAllGroups' + -'UTC_timestamp' + -'ln' + -'distanceLp' + -'QUARTER' + -'current_timestamp' + -'user' + -'normL2Squared' + -'hostname' + -'instr' + -'current_database' + -'INET_NTOA' + -'normLinf' + -'visitParamExtractInt' + -'sqid' + -'normLp' + -'current_schemas' + -'current_user' + -'TO_UNIXTIME' + -'distanceL1' + -'INET_ATON' + -'OCTET_LENGTH' + -'timeZoneOf' + -'visitParamExtractString' + -'INET6_ATON' + -'normalizeLp' + -'yearweek' + -'visitParamExtractUInt' + -'week' + -'trim' + -'FORMAT_BYTES' + -'rtrim' + -'visitParamExtractBool' + -'flatten' + -'to_utc_timestamp' + -'DATABASE' + -'width_bucket' + -'MINUTE' + -'jsonMergePatch' + -'ltrim' + -'DAYOFYEAR' + -'from_utc_timestamp' + -'TO_DAYS' + -'str_to_date' + -'toStartOfFiveMinute' + -'ucase' + -'mod' + -'MONTH' + -'YEAR' + -'serverTimeZone' + -'visitParamExtractRaw' + -'arrayPRAUC' + -'arrayAUC' + -'query_id' + -'REGEXP_MATCHES' + -'FROM_DAYS' + -'normL2' + -'DATE_FORMAT' + -'caseWithoutExpr' + -'lpad' + -'DAYOFWEEK' + -'exponentialTimeDecayedCount' + -'exponentialTimeDecayedMax' + -'lagInFrame' + -'nth_value' + -'ntile' + -'row_number' + -'percentRank' + -'largestTriangleThreeBuckets' + -'flameGraph' + -'exponentialMovingAverage' + -'nothingUInt64' + -'nothingNull' + -'nothing' + -'singleValueOrNull' + -'meanZTest' + -'analysisOfVariance' + -'studentTTest' + -'rankCorr' + -'aggThrow' + -'categoricalInformationValue' + -'groupArrayMovingSum' + -'simpleLinearRegression' + -'entropy' + -'stochasticLogisticRegression' + -'histogram' + -'mannWhitneyUTest' + -'maxIntersections' + -'groupBitmapXor' + -'cramersVBiasCorrected' + -'contingency' + -'theilsU' + -'groupBitmapAnd' + -'cramersV' + -'groupBitXor' + -'groupBitAnd' + -'approx_top_sum' + -'exponentialTimeDecayedSum' + -'topKWeighted' + -'topK' + -'uniqUpTo' + -'stochasticLinearRegression' + -'uniqCombined64' + -'intervalLengthSum' + -'uniqCombined' + -'uniqTheta' + -'nonNegativeDerivative' + -'uniqExact' + -'uniq' + -'kurtPop' + -'sumMapFiltered' + -'distinctJSONPathsAndTypes' + -'distinctJSONPaths' + -'minMappedArrays' + -'quantiles' + -'sum' + -'corrMatrix' + -'quantileExactWeighted' + -'sumMapFilteredWithOverflow' + -'corr' + -'skewPop' + -'corrStable' + -'covarPopMatrix' + -'groupBitmapOr' + -'covarSampMatrix' + -'sumMappedArrays' + -'quantileExactWeightedInterpolated' + -'skewSamp' + -'distinctDynamicTypes' + -'sumMapWithOverflow' + -'stddevSamp' + -'quantileExactHigh' + -'varPop' + -'sumCount' + -'covarPop' + -'varSamp' + -'quantileTimingWeighted' + -'covarPopStable' + -'stddevPopStable' + -'any_respect_nulls' + -'argMin' + -'windowFunnel' + -'retention' + -'sequenceMatch' + -'quantilesExactHigh' + -'quantileGK' + -'anyLast_respect_nulls' + -'quantilesBFloat16Weighted' + -'quantileBFloat16Weighted' + -'deltaSumTimestamp' + -'varSampStable' + -'any' + -'sparkbar' + -'sequenceMatchEvents' + -'max' + -'quantilesDD' + -'denseRank' + -'quantile' + -'quantilesExact' + -'uniqHLL12' + -'min' + -'quantileExactInclusive' + -'quantileDD' + -'kurtSamp' + -'estimateCompressionRatio' + -'quantileTDigest' + -'quantileTDigestWeighted' + -'quantileDeterministic' + -'quantilesTDigest' + -'avg' + -'covarSampStable' + -'quantilesTiming' + -'leadInFrame' + -'quantilesExactExclusive' + -'groupArrayMovingAvg' + -'anyHeavy' + -'groupArrayIntersect' + -'quantileInterpolatedWeighted' + -'quantileExactLow' + -'groupBitmap' + -'quantilesInterpolatedWeighted' + -'quantilesTDigestWeighted' + -'stddevSampStable' + -'quantilesExactWeightedInterpolated' + -'groupUniqArray' + -'sumKahan' + -'quantilesExactWeighted' + -'quantilesDeterministic' + -'groupArrayInsertAt' + -'quantilesGK' + -'rank' + -'maxIntersectionsPosition' + -'quantilesBFloat16' + -'quantilesExactInclusive' + -'groupConcat' + -'boundingRatio' + -'sequenceNextNode' + -'anyLast' + -'quantilesTimingWeighted' + -'groupArray' + -'count' + -'quantileExact' + -'groupArraySorted' + -'maxMappedArrays' + -'stddevPop' + -'groupArrayLast' + -'kolmogorovSmirnovTest' + -'sumWithOverflow' + -'sequenceCount' + -'exponentialTimeDecayedAvg' + -'quantileExactExclusive' + -'avgWeighted' + -'argMax' + -'quantileBFloat16' + -'groupBitOr' + -'approx_top_k' + -'deltaSum' + -'welchTTest' + -'covarSamp' + -'varPopStable' + -'quantileTiming' + -'quantilesExactLow' + -'groupArraySample' + -'BIT_AND' + -'approx_top_count' + -'STD' + -'lttb' + -'STDDEV_POP' + -'anova' + -'STDDEV_SAMP' + -'VAR_SAMP' + -'VAR_POP' + -'lastValueRespectNulls' + -'last_value_respect_nulls' + -'any_value_respect_nulls' + -'BIT_OR' + -'anyLastRespectNulls' + -'firstValueRespectNulls' + -'first_value_respect_nulls' + -'COVAR_SAMP' + -'any_value' + -'medianDD' + -'percent_rank' + -'sparkBar' + -'medianInterpolatedWeighted' + -'medianTDigestWeighted' + -'medianBFloat16' + -'first_value' + -'medianTDigest' + -'BIT_XOR' + -'medianTimingWeighted' + -'group_concat' + -'medianExactHigh' + -'dense_rank' + -'medianExactWeightedInterpolated' + -'medianBFloat16Weighted' + -'anyValueRespectNulls' + -'medianExactWeighted' + -'median' + -'medianExact' + -'medianExactLow' + -'medianTiming' + -'array_agg' + -'medianGK' + -'medianDeterministic' + -'last_value' + -'COVAR_POP' + -'anyRespectNulls' + -'array_concat_agg' diff --git a/styles/ClickHouse/BackTicksServerSettings.yaml b/styles/ClickHouse/BackTicksServerSettings.yaml new file mode 100644 index 00000000000..84794dfc0ea --- /dev/null +++ b/styles/ClickHouse/BackTicksServerSettings.yaml @@ -0,0 +1,204 @@ +extends: existence +message: "ClickHouse server settings '%s' should be enclosed in backticks." +level: suggestion +ignorecase: true +tokens: + -'dictionary_background_reconnect_interval' + -'show_addresses_in_stack_traces' + -'shutdown_wait_unfinished_queries' + -'shutdown_wait_unfinished' + -'max_thread_pool_size' + -'max_thread_pool_free_size' + -'thread_pool_queue_size' + -'max_io_thread_pool_size' + -'max_io_thread_pool_free_size' + -'io_thread_pool_queue_size' + -'max_prefixes_deserialization_thread_pool_size' + -'max_prefixes_deserialization_thread_pool_free_size' + -'prefixes_deserialization_thread_pool_thread_pool_queue_size' + -'max_fetch_partition_thread_pool_size' + -'max_active_parts_loading_thread_pool_size' + -'max_outdated_parts_loading_thread_pool_size' + -'max_unexpected_parts_loading_thread_pool_size' + -'max_parts_cleaning_thread_pool_size' + -'max_mutations_bandwidth_for_server' + -'max_merges_bandwidth_for_server' + -'max_replicated_fetches_network_bandwidth_for_server' + -'max_replicated_sends_network_bandwidth_for_server' + -'max_remote_read_network_bandwidth_for_server' + -'max_remote_write_network_bandwidth_for_server' + -'max_local_read_bandwidth_for_server' + -'max_local_write_bandwidth_for_server' + -'max_backups_io_thread_pool_size' + -'max_backups_io_thread_pool_free_size' + -'backups_io_thread_pool_queue_size' + -'backup_threads' + -'max_backup_bandwidth_for_server' + -'restore_threads' + -'shutdown_wait_backups_and_restores' + -'cannot_allocate_thread_fault_injection_probability' + -'max_connections' + -'asynchronous_metrics_update_period_s' + -'asynchronous_metrics_enable_heavy_metrics' + -'asynchronous_heavy_metrics_update_period_s' + -'default_database' + -'tmp_policy' + -'max_temporary_data_on_disk_size' + -'temporary_data_in_cache' + -'aggregate_function_group_array_max_element_size' + -'aggregate_function_group_array_action_when_limit_is_reached' + -'max_server_memory_usage' + -'max_server_memory_usage_to_ram_ratio' + -'merges_mutations_memory_usage_soft_limit' + -'merges_mutations_memory_usage_to_ram_ratio' + -'allow_use_jemalloc_memory' + -'cgroups_memory_usage_observer_wait_time' + -'cgroup_memory_watcher_hard_limit_ratio' + -'cgroup_memory_watcher_soft_limit_ratio' + -'async_insert_threads' + -'async_insert_queue_flush_on_shutdown' + -'ignore_empty_sql_security_in_create_view_query' + -'max_build_vector_similarity_index_thread_pool_size' + -'database_atomic_delay_before_drop_table_sec' + -'database_catalog_unused_dir_hide_timeout_sec' + -'database_catalog_unused_dir_rm_timeout_sec' + -'database_catalog_unused_dir_cleanup_period_sec' + -'database_catalog_drop_error_cooldown_sec' + -'database_catalog_drop_table_concurrency' + -'max_concurrent_queries' + -'max_concurrent_insert_queries' + -'max_concurrent_select_queries' + -'max_waiting_queries' + -'cache_size_to_ram_max_ratio' + -'uncompressed_cache_policy' + -'uncompressed_cache_size' + -'uncompressed_cache_size_ratio' + -'mark_cache_policy' + -'mark_cache_size' + -'mark_cache_size_ratio' + -'mark_cache_prewarm_ratio' + -'primary_index_cache_policy' + -'primary_index_cache_size' + -'primary_index_cache_size_ratio' + -'primary_index_cache_prewarm_ratio' + -'vector_similarity_index_cache_policy' + -'vector_similarity_index_cache_size' + -'vector_similarity_index_cache_max_entries' + -'vector_similarity_index_cache_size_ratio' + -'index_uncompressed_cache_policy' + -'index_uncompressed_cache_size' + -'index_uncompressed_cache_size_ratio' + -'index_mark_cache_policy' + -'index_mark_cache_size' + -'index_mark_cache_size_ratio' + -'page_cache_block_size' + -'page_cache_history_window_ms' + -'page_cache_policy' + -'page_cache_size_ratio' + -'page_cache_min_size' + -'page_cache_max_size' + -'page_cache_free_memory_ratio' + -'page_cache_lookahead_blocks' + -'page_cache_shards' + -'mmap_cache_size' + -'compiled_expression_cache_size' + -'compiled_expression_cache_elements_size' + -'query_condition_cache_policy' + -'query_condition_cache_size' + -'query_condition_cache_size_ratio' + -'disable_internal_dns_cache' + -'dns_cache_max_entries' + -'dns_cache_update_period' + -'dns_max_consecutive_failures' + -'dns_allow_resolve_names_to_ipv4' + -'dns_allow_resolve_names_to_ipv6' + -'max_table_size_to_drop' + -'max_partition_size_to_drop' + -'max_table_num_to_warn' + -'max_pending_mutations_to_warn' + -'max_view_num_to_warn' + -'max_dictionary_num_to_warn' + -'max_database_num_to_warn' + -'max_part_num_to_warn' + -'max_table_num_to_throw' + -'max_replicated_table_num_to_throw' + -'max_dictionary_num_to_throw' + -'max_view_num_to_throw' + -'max_database_num_to_throw' + -'max_authentication_methods_per_user' + -'concurrent_threads_soft_limit_num' + -'concurrent_threads_soft_limit_ratio_to_cores' + -'concurrent_threads_scheduler' + -'background_pool_size' + -'background_merges_mutations_concurrency_ratio' + -'background_merges_mutations_scheduling_policy' + -'background_move_pool_size' + -'background_fetches_pool_size' + -'background_common_pool_size' + -'background_buffer_flush_schedule_pool_size' + -'background_schedule_pool_size' + -'background_message_broker_schedule_pool_size' + -'background_distributed_schedule_pool_size' + -'tables_loader_foreground_pool_size' + -'tables_loader_background_pool_size' + -'async_load_databases' + -'async_load_system_database' + -'display_secrets_in_show_and_select' + -'keep_alive_timeout' + -'max_keep_alive_requests' + -'replicated_fetches_http_connection_timeout' + -'replicated_fetches_http_send_timeout' + -'replicated_fetches_http_receive_timeout' + -'total_memory_profiler_step' + -'total_memory_tracker_sample_probability' + -'total_memory_profiler_sample_min_allocation_size' + -'total_memory_profiler_sample_max_allocation_size' + -'validate_tcp_client_information' + -'storage_metadata_write_full_object_key' + -'max_materialized_views_count_for_table' + -'max_database_replicated_create_table_thread_pool_size' + -'database_replicated_allow_detach_permanently' + -'format_alter_operations_with_parentheses' + -'default_replica_path' + -'default_replica_name' + -'disk_connections_soft_limit' + -'disk_connections_warn_limit' + -'disk_connections_store_limit' + -'storage_connections_soft_limit' + -'storage_connections_warn_limit' + -'storage_connections_store_limit' + -'http_connections_soft_limit' + -'http_connections_warn_limit' + -'http_connections_store_limit' + -'global_profiler_real_time_period_ns' + -'global_profiler_cpu_time_period_ns' + -'enable_azure_sdk_logging' + -'max_entries_for_hash_table_stats' + -'merge_workload' + -'mutation_workload' + -'throw_on_unknown_workload' + -'series_keeper_path' + -'prepare_system_log_tables_on_startup' + -'config_reload_interval_ms' + -'memory_worker_period_ms' + -'memory_worker_correct_memory_tracker' + -'memory_worker_use_cgroup' + -'disable_insertion_and_mutation' + -'parts_kill_delay_period' + -'parts_kill_delay_period_random_add' + -'parts_killer_pool_size' + -'keeper_multiread_batch_size' + -'use_legacy_mongodb_integration' + -'license_key' + -'prefetch_threadpool_pool_size' + -'prefetch_threadpool_queue_size' + -'load_marks_threadpool_pool_size' + -'load_marks_threadpool_queue_size' + -'threadpool_writer_pool_size' + -'threadpool_writer_queue_size' + -'iceberg_catalog_threadpool_pool_size' + -'iceberg_catalog_threadpool_queue_size' + -'allow_feature_tier' + -'dictionaries_lazy_load' + -'wait_dictionaries_load_at_startup' + -'storage_shared_set_join_use_inner_uuid' diff --git a/styles/ClickHouse/BackTicksSessionSettings.yaml b/styles/ClickHouse/BackTicksSessionSettings.yaml new file mode 100644 index 00000000000..96268be2a8f --- /dev/null +++ b/styles/ClickHouse/BackTicksSessionSettings.yaml @@ -0,0 +1,1233 @@ +extends: existence +message: "ClickHouse settings '%s' should be enclosed in backticks." +level: suggestion +ignorecase: true +tokens: + -'dialect' + -'min_compress_block_size' + -'max_compress_block_size' + -'max_block_size' + -'max_insert_block_size' + -'min_insert_block_size_rows' + -'min_insert_block_size_bytes' + -'min_insert_block_size_rows_for_materialized_views' + -'min_insert_block_size_bytes_for_materialized_views' + -'min_external_table_block_size_rows' + -'min_external_table_block_size_bytes' + -'max_joined_block_size_rows' + -'min_joined_block_size_bytes' + -'max_insert_threads' + -'max_insert_delayed_streams_for_parallel_write' + -'max_final_threads' + -'max_threads_for_indexes' + -'max_threads' + -'use_concurrency_control' + -'max_download_threads' + -'max_parsing_threads' + -'max_download_buffer_size' + -'max_read_buffer_size' + -'max_read_buffer_size_local_fs' + -'max_read_buffer_size_remote_fs' + -'max_distributed_connections' + -'max_query_size' + -'interactive_delay' + -'connect_timeout' + -'handshake_timeout_ms' + -'connect_timeout_with_failover_ms' + -'connect_timeout_with_failover_secure_ms' + -'receive_timeout' + -'send_timeout' + -'tcp_keep_alive_timeout' + -'hedged_connection_timeout_ms' + -'receive_data_timeout_ms' + -'use_hedged_requests' + -'allow_changing_replica_until_first_data_packet' + -'queue_max_wait_ms' + -'connection_pool_max_wait_ms' + -'replace_running_query_max_wait_ms' + -'kafka_max_wait_ms' + -'rabbitmq_max_wait_ms' + -'poll_interval' + -'idle_connection_timeout' + -'distributed_connections_pool_size' + -'connections_with_failover_max_tries' + -'s3_strict_upload_part_size' + -'azure_strict_upload_part_size' + -'azure_max_blocks_in_multipart_upload' + -'s3_min_upload_part_size' + -'s3_max_upload_part_size' + -'azure_min_upload_part_size' + -'azure_max_upload_part_size' + -'s3_upload_part_size_multiply_factor' + -'s3_upload_part_size_multiply_parts_count_threshold' + -'s3_max_part_number' + -'s3_allow_multipart_copy' + -'s3_max_single_operation_copy_size' + -'azure_upload_part_size_multiply_factor' + -'azure_upload_part_size_multiply_parts_count_threshold' + -'s3_max_inflight_parts_for_one_file' + -'azure_max_inflight_parts_for_one_file' + -'s3_max_single_part_upload_size' + -'azure_max_single_part_upload_size' + -'azure_max_single_part_copy_size' + -'s3_max_single_read_retries' + -'azure_max_single_read_retries' + -'azure_max_unexpected_write_error_retries' + -'s3_max_unexpected_write_error_retries' + -'s3_max_redirects' + -'s3_max_connections' + -'s3_max_get_rps' + -'s3_max_get_burst' + -'s3_max_put_rps' + -'s3_max_put_burst' + -'s3_list_object_keys_size' + -'s3_use_adaptive_timeouts' + -'azure_list_object_keys_size' + -'s3_truncate_on_insert' + -'azure_truncate_on_insert' + -'s3_create_new_file_on_insert' + -'s3_skip_empty_files' + -'azure_create_new_file_on_insert' + -'s3_check_objects_after_upload' + -'azure_check_objects_after_upload' + -'s3_allow_parallel_part_upload' + -'azure_allow_parallel_part_upload' + -'s3_throw_on_zero_files_match' + -'hdfs_throw_on_zero_files_match' + -'azure_throw_on_zero_files_match' + -'s3_ignore_file_doesnt_exist' + -'hdfs_ignore_file_doesnt_exist' + -'azure_ignore_file_doesnt_exist' + -'azure_sdk_max_retries' + -'azure_sdk_retry_initial_backoff_ms' + -'azure_sdk_retry_max_backoff_ms' + -'s3_validate_request_settings' + -'s3_disable_checksum' + -'s3_retry_attempts' + -'s3_request_timeout_ms' + -'s3_connect_timeout_ms' + -'enable_s3_requests_logging' + -'s3queue_default_zookeeper_path' + -'s3queue_migrate_old_metadata_to_buckets' + -'s3queue_enable_logging_to_s3queue_log' + -'hdfs_replication' + -'hdfs_truncate_on_insert' + -'hdfs_create_new_file_on_insert' + -'hdfs_skip_empty_files' + -'azure_skip_empty_files' + -'hsts_max_age' + -'extremes' + -'use_uncompressed_cache' + -'replace_running_query' + -'max_remote_read_network_bandwidth' + -'max_remote_write_network_bandwidth' + -'max_local_read_bandwidth' + -'max_local_write_bandwidth' + -'stream_like_engine_allow_direct_select' + -'stream_like_engine_insert_queue' + -'dictionary_validate_primary_key_type' + -'distributed_insert_skip_read_only_replicas' + -'distributed_foreground_insert' + -'insert_distributed_sync' + -'distributed_background_insert_timeout' + -'insert_distributed_timeout' + -'distributed_background_insert_sleep_time_ms' + -'distributed_directory_monitor_sleep_time_ms' + -'distributed_background_insert_max_sleep_time_ms' + -'distributed_directory_monitor_max_sleep_time_ms' + -'distributed_background_insert_batch' + -'distributed_directory_monitor_batch_inserts' + -'distributed_background_insert_split_batch_on_failure' + -'distributed_directory_monitor_split_batch_on_failure' + -'optimize_move_to_prewhere' + -'optimize_move_to_prewhere_if_final' + -'move_all_conditions_to_prewhere' + -'enable_multiple_prewhere_read_steps' + -'move_primary_key_columns_to_end_of_prewhere' + -'allow_reorder_prewhere_conditions' + -'alter_sync' + -'replication_alter_partitions_sync' + -'replication_wait_for_inactive_replica_timeout' + -'alter_move_to_space_execute_async' + -'load_balancing' + -'load_balancing_first_offset' + -'totals_mode' + -'totals_auto_threshold' + -'allow_suspicious_low_cardinality_types' + -'allow_suspicious_fixed_string_types' + -'allow_suspicious_indices' + -'allow_suspicious_ttl_expressions' + -'allow_suspicious_variant_types' + -'allow_suspicious_primary_key' + -'allow_suspicious_types_in_group_by' + -'allow_suspicious_types_in_order_by' + -'allow_not_comparable_types_in_order_by' + -'allow_not_comparable_types_in_comparison_functions' + -'compile_expressions' + -'min_count_to_compile_expression' + -'compile_aggregate_expressions' + -'min_count_to_compile_aggregate_expression' + -'compile_sort_description' + -'min_count_to_compile_sort_description' + -'group_by_two_level_threshold' + -'group_by_two_level_threshold_bytes' + -'distributed_aggregation_memory_efficient' + -'aggregation_memory_efficient_merge_threads' + -'enable_memory_bound_merging_of_aggregation_results' + -'enable_positional_arguments' + -'enable_extended_results_for_datetime_functions' + -'allow_nonconst_timezone_arguments' + -'function_locate_has_mysql_compatible_argument_order' + -'group_by_use_nulls' + -'skip_unavailable_shards' + -'parallel_distributed_insert_select' + -'distributed_group_by_no_merge' + -'distributed_push_down_limit' + -'optimize_distributed_group_by_sharding_key' + -'optimize_skip_unused_shards_limit' + -'optimize_skip_unused_shards' + -'optimize_skip_unused_shards_rewrite_in' + -'allow_nondeterministic_optimize_skip_unused_shards' + -'force_optimize_skip_unused_shards' + -'optimize_skip_unused_shards_nesting' + -'force_optimize_skip_unused_shards_nesting' + -'input_format_parallel_parsing' + -'min_chunk_bytes_for_parallel_parsing' + -'output_format_parallel_formatting' + -'output_format_compression_level' + -'output_format_compression_zstd_window_log' + -'enable_parsing_to_custom_serialization' + -'merge_tree_use_v1_object_and_dynamic_serialization' + -'merge_tree_min_rows_for_concurrent_read' + -'merge_tree_min_bytes_for_concurrent_read' + -'merge_tree_min_rows_for_seek' + -'merge_tree_min_bytes_for_seek' + -'merge_tree_coarse_index_granularity' + -'merge_tree_max_rows_to_use_cache' + -'merge_tree_max_bytes_to_use_cache' + -'merge_tree_use_deserialization_prefixes_cache' + -'merge_tree_use_prefixes_deserialization_thread_pool' + -'do_not_merge_across_partitions_select_final' + -'split_parts_ranges_into_intersecting_and_non_intersecting_final' + -'split_intersecting_parts_ranges_into_layers_final' + -'mysql_max_rows_to_insert' + -'mysql_map_string_to_text_in_show_columns' + -'mysql_map_fixed_string_to_text_in_show_columns' + -'optimize_min_equality_disjunction_chain_length' + -'optimize_min_inequality_conjunction_chain_length' + -'min_bytes_to_use_direct_io' + -'min_bytes_to_use_mmap_io' + -'checksum_on_read' + -'force_index_by_date' + -'force_primary_key' + -'use_skip_indexes' + -'use_skip_indexes_if_final' + -'materialize_skip_indexes_on_insert' + -'materialize_statistics_on_insert' + -'ignore_data_skipping_indices' + -'force_data_skipping_indices' + -'max_streams_to_max_threads_ratio' + -'max_streams_multiplier_for_merge_tables' + -'network_compression_method' + -'network_zstd_compression_level' + -'zstd_window_log_max' + -'priority' + -'os_thread_priority' + -'log_queries' + -'log_formatted_queries' + -'log_queries_min_type' + -'log_queries_min_query_duration_ms' + -'log_queries_cut_to_length' + -'log_queries_probability' + -'log_processors_profiles' + -'distributed_product_mode' + -'max_concurrent_queries_for_all_users' + -'max_concurrent_queries_for_user' + -'insert_deduplicate' + -'async_insert_deduplicate' + -'insert_quorum' + -'insert_quorum_timeout' + -'insert_quorum_parallel' + -'select_sequential_consistency' + -'table_function_remote_max_addresses' + -'read_backoff_min_latency_ms' + -'read_backoff_max_throughput' + -'read_backoff_min_interval_between_events_ms' + -'read_backoff_min_events' + -'read_backoff_min_concurrency' + -'memory_tracker_fault_probability' + -'merge_tree_read_split_ranges_into_intersecting_and_non_intersecting_injection_probability' + -'enable_http_compression' + -'http_zlib_compression_level' + -'http_native_compression_disable_checksumming_on_decompress' + -'http_response_headers' + -'count_distinct_implementation' + -'add_http_cors_header' + -'max_http_get_redirects' + -'use_client_time_zone' + -'send_progress_in_http_headers' + -'http_headers_progress_interval_ms' + -'http_wait_end_of_query' + -'http_write_exception_in_output_format' + -'http_response_buffer_size' + -'fsync_metadata' + -'join_use_nulls' + -'join_output_by_rowlist_perkey_rows_threshold' + -'join_default_strictness' + -'any_join_distinct_right_table_keys' + -'single_join_prefer_left_table' + -'query_plan_join_swap_table' + -'preferred_block_size_bytes' + -'max_replica_delay_for_distributed_queries' + -'fallback_to_stale_replicas_for_distributed_queries' + -'preferred_max_column_in_block_size_bytes' + -'parts_to_delay_insert' + -'parts_to_throw_insert' + -'number_of_mutations_to_delay' + -'number_of_mutations_to_throw' + -'distributed_ddl_task_timeout' + -'stream_flush_interval_ms' + -'stream_poll_timeout_ms' + -'min_free_disk_bytes_to_perform_insert' + -'min_free_disk_ratio_to_perform_insert' + -'final' + -'partial_result_on_first_cancel' + -'ignore_on_cluster_for_replicated_udf_queries' + -'ignore_on_cluster_for_replicated_access_entities_queries' + -'ignore_on_cluster_for_replicated_named_collections_queries' + -'sleep_in_send_tables_status_ms' + -'sleep_in_send_data_ms' + -'sleep_after_receiving_query_ms' + -'unknown_packet_in_send_data' + -'insert_allow_materialized_columns' + -'http_connection_timeout' + -'http_send_timeout' + -'http_receive_timeout' + -'http_max_uri_size' + -'http_max_fields' + -'http_max_field_name_size' + -'http_max_field_value_size' + -'http_skip_not_found_url_for_globs' + -'http_make_head_request' + -'optimize_throw_if_noop' + -'use_index_for_in_with_subqueries' + -'use_index_for_in_with_subqueries_max_values' + -'analyze_index_with_space_filling_curves' + -'joined_subquery_requires_alias' + -'empty_result_for_aggregation_by_empty_set' + -'empty_result_for_aggregation_by_constant_keys_on_empty_set' + -'allow_distributed_ddl' + -'allow_suspicious_codecs' + -'enable_zstd_qat_codec' + -'enable_deflate_qpl_codec' + -'query_profiler_real_time_period_ns' + -'query_profiler_cpu_time_period_ns' + -'metrics_perf_events_enabled' + -'metrics_perf_events_list' + -'opentelemetry_start_trace_probability' + -'opentelemetry_trace_processors' + -'prefer_column_name_to_alias' + -'skip_redundant_aliases_in_udf' + -'prefer_global_in_and_join' + -'enable_vertical_final' + -'max_rows_to_read' + -'max_bytes_to_read' + -'read_overflow_mode' + -'max_rows_to_read_leaf' + -'max_bytes_to_read_leaf' + -'read_overflow_mode_leaf' + -'max_rows_to_group_by' + -'group_by_overflow_mode' + -'max_bytes_before_external_group_by' + -'max_bytes_ratio_before_external_group_by' + -'max_rows_to_sort' + -'max_bytes_to_sort' + -'sort_overflow_mode' + -'prefer_external_sort_block_bytes' + -'min_external_sort_block_bytes' + -'max_bytes_before_external_sort' + -'max_bytes_ratio_before_external_sort' + -'max_bytes_before_remerge_sort' + -'remerge_sort_lowered_memory_bytes_ratio' + -'max_result_rows' + -'max_result_bytes' + -'result_overflow_mode' + -'max_execution_time' + -'timeout_overflow_mode' + -'max_execution_time_leaf' + -'timeout_overflow_mode_leaf' + -'min_execution_speed' + -'max_execution_speed' + -'min_execution_speed_bytes' + -'max_execution_speed_bytes' + -'timeout_before_checking_execution_speed' + -'max_estimated_execution_time' + -'max_columns_to_read' + -'max_temporary_columns' + -'max_temporary_non_const_columns' + -'max_sessions_for_user' + -'max_subquery_depth' + -'max_analyze_depth' + -'max_ast_depth' + -'max_ast_elements' + -'max_expanded_ast_elements' + -'readonly' + -'max_rows_in_set' + -'max_bytes_in_set' + -'set_overflow_mode' + -'max_rows_in_join' + -'max_bytes_in_join' + -'join_overflow_mode' + -'join_any_take_last_row' + -'join_algorithm' + -'cross_join_min_rows_to_compress' + -'cross_join_min_bytes_to_compress' + -'default_max_bytes_in_join' + -'partial_merge_join_left_table_buffer_bytes' + -'partial_merge_join_rows_in_right_blocks' + -'join_on_disk_max_files_to_merge' + -'max_rows_in_set_to_optimize_join' + -'compatibility_ignore_collation_in_create_table' + -'temporary_files_codec' + -'max_rows_to_transfer' + -'max_bytes_to_transfer' + -'transfer_overflow_mode' + -'max_rows_in_distinct' + -'max_bytes_in_distinct' + -'distinct_overflow_mode' + -'max_memory_usage' + -'memory_overcommit_ratio_denominator' + -'max_memory_usage_for_user' + -'memory_overcommit_ratio_denominator_for_user' + -'max_untracked_memory' + -'memory_profiler_step' + -'memory_profiler_sample_probability' + -'memory_profiler_sample_min_allocation_size' + -'memory_profiler_sample_max_allocation_size' + -'trace_profile_events' + -'memory_usage_overcommit_max_wait_microseconds' + -'max_network_bandwidth' + -'max_network_bytes' + -'max_network_bandwidth_for_user' + -'max_network_bandwidth_for_all_users' + -'max_temporary_data_on_disk_size_for_user' + -'max_temporary_data_on_disk_size_for_query' + -'backup_restore_keeper_max_retries' + -'backup_restore_keeper_retry_initial_backoff_ms' + -'backup_restore_keeper_retry_max_backoff_ms' + -'backup_restore_failure_after_host_disconnected_for_seconds' + -'backup_restore_keeper_max_retries_while_initializing' + -'backup_restore_keeper_max_retries_while_handling_error' + -'backup_restore_finish_timeout_after_error_sec' + -'backup_restore_keeper_value_max_size' + -'backup_restore_batch_size_for_keeper_multi' + -'backup_restore_batch_size_for_keeper_multiread' + -'backup_restore_keeper_fault_injection_probability' + -'backup_restore_keeper_fault_injection_seed' + -'backup_restore_s3_retry_attempts' + -'max_backup_bandwidth' + -'restore_replicated_merge_tree_to_shared_merge_tree' + -'log_profile_events' + -'log_query_settings' + -'log_query_threads' + -'log_query_views' + -'log_comment' + -'query_metric_log_interval' + -'send_logs_level' + -'send_logs_source_regexp' + -'enable_optimize_predicate_expression' + -'enable_optimize_predicate_expression_to_final_subquery' + -'allow_push_predicate_when_subquery_contains_with' + -'allow_push_predicate_ast_for_distributed_subqueries' + -'low_cardinality_max_dictionary_size' + -'low_cardinality_use_single_dictionary_for_part' + -'decimal_check_overflow' + -'allow_custom_error_code_in_throwif' + -'prefer_localhost_replica' + -'max_fetch_partition_retries_count' + -'http_max_multipart_form_data_size' + -'calculate_text_stack_trace' + -'enable_job_stack_trace' + -'allow_ddl' + -'parallel_view_processing' + -'enable_unaligned_array_join' + -'optimize_read_in_order' + -'read_in_order_use_virtual_row' + -'optimize_read_in_window_order' + -'optimize_aggregation_in_order' + -'read_in_order_use_buffering' + -'aggregation_in_order_max_block_bytes' + -'read_in_order_two_level_merge_threshold' + -'low_cardinality_allow_in_native_format' + -'cancel_http_readonly_queries_on_client_close' + -'external_table_functions_use_nulls' + -'external_table_strict_query' + -'allow_hyperscan' + -'max_hyperscan_regexp_length' + -'max_hyperscan_regexp_total_length' + -'reject_expensive_hyperscan_regexps' + -'allow_simdjson' + -'allow_introspection_functions' + -'splitby_max_substrings_includes_remaining_string' + -'allow_execute_multiif_columnar' + -'formatdatetime_f_prints_single_zero' + -'formatdatetime_f_prints_scale_number_of_digits' + -'formatdatetime_parsedatetime_m_is_month_name' + -'parsedatetime_parse_without_leading_zeros' + -'formatdatetime_format_without_leading_zeros' + -'least_greatest_legacy_null_behavior' + -'h3togeo_lon_lat_result_order' + -'max_partitions_per_insert_block' + -'throw_on_max_partitions_per_insert_block' + -'max_partitions_to_read' + -'check_query_single_value_result' + -'allow_drop_detached' + -'max_parts_to_move' + -'max_table_size_to_drop' + -'max_partition_size_to_drop' + -'postgresql_connection_pool_size' + -'postgresql_connection_attempt_timeout' + -'postgresql_connection_pool_wait_timeout' + -'postgresql_connection_pool_retries' + -'postgresql_connection_pool_auto_close_connection' + -'postgresql_fault_injection_probability' + -'glob_expansion_max_elements' + -'odbc_bridge_connection_pool_size' + -'odbc_bridge_use_connection_pooling' + -'distributed_replica_error_half_life' + -'distributed_replica_error_cap' + -'distributed_replica_max_ignored_errors' + -'min_free_disk_space_for_temporary_data' + -'default_temporary_table_engine' + -'default_table_engine' + -'show_table_uuid_in_table_create_query_if_not_nil' + -'database_atomic_wait_for_drop_and_detach_synchronously' + -'enable_scalar_subquery_optimization' + -'optimize_trivial_count_query' + -'optimize_trivial_approximate_count_query' + -'optimize_count_from_files' + -'use_cache_for_count_from_files' + -'optimize_respect_aliases' + -'mutations_sync' + -'enable_lightweight_delete' + -'allow_experimental_lightweight_delete' + -'lightweight_deletes_sync' + -'apply_deleted_mask' + -'optimize_normalize_count_variants' + -'optimize_injective_functions_inside_uniq' + -'rewrite_count_distinct_if_with_count_distinct_implementation' + -'convert_query_to_cnf' + -'optimize_or_like_chain' + -'optimize_arithmetic_operations_in_aggregate_functions' + -'optimize_redundant_functions_in_order_by' + -'optimize_if_chain_to_multiif' + -'optimize_multiif_to_if' + -'optimize_if_transform_strings_to_enum' + -'optimize_functions_to_subcolumns' + -'optimize_using_constraints' + -'optimize_substitute_columns' + -'optimize_append_index' + -'optimize_time_filter_with_preimage' + -'normalize_function_names' + -'enable_early_constant_folding' + -'deduplicate_blocks_in_dependent_materialized_views' + -'throw_if_deduplication_in_dependent_materialized_views_enabled_with_async_insert' + -'materialized_views_ignore_errors' + -'ignore_materialized_views_with_dropped_target_table' + -'allow_materialized_view_with_bad_select' + -'use_compact_format_in_distributed_parts_names' + -'validate_polygons' + -'max_parser_depth' + -'max_parser_backtracks' + -'max_recursive_cte_evaluation_depth' + -'allow_settings_after_format_in_insert' + -'periodic_live_view_refresh' + -'transform_null_in' + -'allow_nondeterministic_mutations' + -'validate_mutation_query' + -'lock_acquire_timeout' + -'materialize_ttl_after_modify' + -'function_implementation' + -'data_type_default_nullable' + -'cast_keep_nullable' + -'cast_ipv4_ipv6_default_on_conversion_error' + -'alter_partition_verbose_result' + -'system_events_show_zero_values' + -'mysql_datatypes_support_level' + -'optimize_trivial_insert_select' + -'allow_non_metadata_alters' + -'enable_global_with_statement' + -'aggregate_functions_null_for_empty' + -'optimize_syntax_fuse_functions' + -'flatten_nested' + -'asterisk_include_materialized_columns' + -'asterisk_include_alias_columns' + -'optimize_skip_merged_partitions' + -'optimize_on_insert' + -'optimize_use_projections' + -'allow_experimental_projection_optimization' + -'optimize_use_implicit_projections' + -'force_optimize_projection' + -'force_optimize_projection_name' + -'preferred_optimize_projection_name' + -'async_socket_for_remote' + -'async_query_sending_for_remote' + -'insert_null_as_default' + -'describe_extend_object_types' + -'describe_include_subcolumns' + -'describe_include_virtual_columns' + -'describe_compact_output' + -'apply_mutations_on_fly' + -'mutations_execute_nondeterministic_on_initiator' + -'mutations_execute_subqueries_on_initiator' + -'mutations_max_literal_size_to_replace' + -'create_replicated_merge_tree_fault_injection_probability' + -'use_query_cache' + -'enable_writes_to_query_cache' + -'enable_reads_from_query_cache' + -'query_cache_nondeterministic_function_handling' + -'query_cache_system_table_handling' + -'query_cache_max_size_in_bytes' + -'query_cache_max_entries' + -'query_cache_min_query_runs' + -'query_cache_min_query_duration' + -'query_cache_compress_entries' + -'query_cache_squash_partial_results' + -'query_cache_ttl' + -'query_cache_share_between_users' + -'query_cache_tag' + -'enable_sharing_sets_for_mutations' + -'use_query_condition_cache' + -'optimize_rewrite_sum_if_to_count_if' + -'optimize_rewrite_aggregate_function_with_if' + -'optimize_rewrite_array_exists_to_has' + -'insert_shard_id' + -'collect_hash_table_stats_during_aggregation' + -'max_size_to_preallocate_for_aggregation' + -'collect_hash_table_stats_during_joins' + -'max_size_to_preallocate_for_joins' + -'kafka_disable_num_consumers_limit' + -'allow_experimental_kafka_offsets_storage_in_keeper' + -'enable_software_prefetch_in_aggregation' + -'allow_aggregate_partitions_independently' + -'force_aggregate_partitions_independently' + -'max_number_of_partitions_for_independent_aggregation' + -'min_hit_rate_to_use_consecutive_keys_optimization' + -'engine_file_empty_if_not_exists' + -'engine_file_truncate_on_insert' + -'engine_file_allow_create_multiple_files' + -'engine_file_skip_empty_files' + -'engine_url_skip_empty_files' + -'enable_url_encoding' + -'database_replicated_initial_query_timeout_sec' + -'database_replicated_enforce_synchronous_settings' + -'max_distributed_depth' + -'database_replicated_always_detach_permanently' + -'database_replicated_allow_only_replicated_engine' + -'database_replicated_allow_replicated_engine_arguments' + -'database_replicated_allow_explicit_uuid' + -'database_replicated_allow_heavy_create' + -'cloud_mode' + -'cloud_mode_engine' + -'cloud_mode_database_engine' + -'distributed_ddl_output_mode' + -'distributed_ddl_entry_format_version' + -'external_storage_max_read_rows' + -'external_storage_max_read_bytes' + -'external_storage_connect_timeout_sec' + -'external_storage_rw_timeout_sec' + -'union_default_mode' + -'intersect_default_mode' + -'except_default_mode' + -'optimize_aggregators_of_group_by_keys' + -'optimize_injective_functions_in_group_by' + -'optimize_group_by_function_keys' + -'optimize_group_by_constant_keys' + -'legacy_column_name_of_tuple_literal' + -'enable_named_columns_in_function_tuple' + -'query_plan_enable_optimizations' + -'query_plan_max_optimizations_to_apply' + -'query_plan_lift_up_array_join' + -'query_plan_push_down_limit' + -'query_plan_split_filter' + -'query_plan_merge_expressions' + -'query_plan_merge_filters' + -'query_plan_filter_push_down' + -'query_plan_convert_outer_join_to_inner_join' + -'query_plan_optimize_prewhere' + -'query_plan_execute_functions_after_sorting' + -'query_plan_reuse_storage_ordering_for_window_functions' + -'query_plan_lift_up_union' + -'query_plan_read_in_order' + -'query_plan_aggregation_in_order' + -'query_plan_remove_redundant_sorting' + -'query_plan_remove_redundant_distinct' + -'query_plan_try_use_vector_search' + -'query_plan_enable_multithreading_after_window_functions' + -'query_plan_use_new_logical_join_step' + -'regexp_max_matches_per_row' + -'limit' + -'offset' + -'function_range_max_elements_in_block' + -'function_sleep_max_microseconds_per_block' + -'function_visible_width_behavior' + -'short_circuit_function_evaluation' + -'storage_file_read_method' + -'local_filesystem_read_method' + -'remote_filesystem_read_method' + -'local_filesystem_read_prefetch' + -'remote_filesystem_read_prefetch' + -'read_priority' + -'merge_tree_min_rows_for_concurrent_read_for_remote_filesystem' + -'merge_tree_min_bytes_for_concurrent_read_for_remote_filesystem' + -'remote_read_min_bytes_for_seek' + -'merge_tree_min_bytes_per_task_for_remote_reading' + -'filesystem_prefetch_min_bytes_for_single_read_task' + -'merge_tree_use_const_size_tasks_for_remote_reading' + -'merge_tree_determine_task_size_by_prewhere_columns' + -'merge_tree_min_read_task_size' + -'merge_tree_compact_parts_min_granules_to_multibuffer_read' + -'async_insert' + -'wait_for_async_insert' + -'wait_for_async_insert_timeout' + -'async_insert_max_data_size' + -'async_insert_max_query_number' + -'async_insert_poll_timeout_ms' + -'async_insert_use_adaptive_busy_timeout' + -'async_insert_busy_timeout_min_ms' + -'async_insert_busy_timeout_max_ms' + -'async_insert_busy_timeout_ms' + -'async_insert_busy_timeout_increase_rate' + -'async_insert_busy_timeout_decrease_rate' + -'remote_fs_read_max_backoff_ms' + -'remote_fs_read_backoff_max_tries' + -'enable_filesystem_cache' + -'filesystem_cache_name' + -'enable_filesystem_cache_on_write_operations' + -'enable_filesystem_cache_log' + -'read_from_filesystem_cache_if_exists_otherwise_bypass_cache' + -'filesystem_cache_skip_download_if_exceeds_per_query_cache_write_limit' + -'skip_download_if_exceeds_query_cache' + -'filesystem_cache_max_download_size' + -'throw_on_error_from_cache_on_write_operations' + -'filesystem_cache_segments_batch_size' + -'filesystem_cache_reserve_space_wait_lock_timeout_milliseconds' + -'filesystem_cache_prefer_bigger_buffer_size' + -'filesystem_cache_boundary_alignment' + -'temporary_data_in_cache_reserve_space_wait_lock_timeout_milliseconds' + -'use_page_cache_for_disks_without_file_cache' + -'use_page_cache_with_distributed_cache' + -'read_from_page_cache_if_exists_otherwise_bypass_cache' + -'page_cache_inject_eviction' + -'load_marks_asynchronously' + -'enable_filesystem_read_prefetches_log' + -'allow_prefetched_read_pool_for_remote_filesystem' + -'allow_prefetched_read_pool_for_local_filesystem' + -'prefetch_buffer_size' + -'filesystem_prefetch_step_bytes' + -'filesystem_prefetch_step_marks' + -'filesystem_prefetch_max_memory_usage' + -'filesystem_prefetches_limit' + -'use_structure_from_insertion_table_in_table_functions' + -'http_max_tries' + -'http_retry_initial_backoff_ms' + -'http_retry_max_backoff_ms' + -'force_remove_data_recursively_on_drop' + -'check_table_dependencies' + -'check_referential_table_dependencies' + -'use_local_cache_for_remote_storage' + -'allow_unrestricted_reads_from_keeper' + -'allow_deprecated_database_ordinary' + -'allow_deprecated_syntax_for_merge_tree' + -'allow_asynchronous_read_from_io_pool_for_merge_tree' + -'max_streams_for_merge_tree_reading' + -'force_grouping_standard_compatibility' + -'schema_inference_use_cache_for_file' + -'schema_inference_use_cache_for_s3' + -'schema_inference_use_cache_for_azure' + -'schema_inference_use_cache_for_hdfs' + -'schema_inference_use_cache_for_url' + -'schema_inference_cache_require_modification_time_for_url' + -'compatibility' + -'additional_table_filters' + -'additional_result_filter' + -'workload' + -'storage_system_stack_trace_pipe_read_timeout_ms' + -'rename_files_after_processing' + -'read_through_distributed_cache' + -'write_through_distributed_cache' + -'distributed_cache_throw_on_error' + -'distributed_cache_log_mode' + -'distributed_cache_fetch_metrics_only_from_current_az' + -'distributed_cache_connect_max_tries' + -'distributed_cache_receive_response_wait_milliseconds' + -'distributed_cache_receive_timeout_milliseconds' + -'distributed_cache_wait_connection_from_pool_milliseconds' + -'distributed_cache_bypass_connection_pool' + -'distributed_cache_pool_behaviour_on_limit' + -'distributed_cache_read_alignment' + -'distributed_cache_max_unacked_inflight_packets' + -'distributed_cache_data_packet_ack_window' + -'distributed_cache_discard_connection_if_unread_data' + -'distributed_cache_min_bytes_for_seek' + -'filesystem_cache_enable_background_download_for_metadata_files_in_packed_storage' + -'filesystem_cache_enable_background_download_during_fetch' + -'parallelize_output_from_storages' + -'insert_deduplication_token' + -'count_distinct_optimization' + -'throw_if_no_data_to_insert' + -'compatibility_ignore_auto_increment_in_create_table' + -'multiple_joins_try_to_keep_original_names' + -'optimize_sorting_by_input_stream_properties' + -'keeper_max_retries' + -'keeper_retry_initial_backoff_ms' + -'keeper_retry_max_backoff_ms' + -'insert_keeper_max_retries' + -'insert_keeper_retry_initial_backoff_ms' + -'insert_keeper_retry_max_backoff_ms' + -'insert_keeper_fault_injection_probability' + -'insert_keeper_fault_injection_seed' + -'force_aggregation_in_order' + -'http_max_request_param_data_size' + -'function_json_value_return_type_allow_nullable' + -'function_json_value_return_type_allow_complex' + -'use_with_fill_by_sorting_prefix' + -'optimize_uniq_to_count' + -'use_variant_as_common_type' + -'enable_order_by_all' + -'ignore_drop_queries_probability' + -'traverse_shadow_remote_data_paths' + -'geo_distance_returns_float64_on_float64_arguments' + -'allow_get_client_http_header' + -'cast_string_to_dynamic_use_inference' + -'enable_blob_storage_log' + -'use_json_alias_for_old_object_type' + -'allow_create_index_without_type' + -'create_index_ignore_unique' + -'print_pretty_type_names' + -'create_table_empty_primary_key_by_default' + -'allow_named_collection_override_by_default' + -'default_normal_view_sql_security' + -'default_materialized_view_sql_security' + -'default_view_definer' + -'cache_warmer_threads' + -'use_async_executor_for_materialized_views' + -'ignore_cold_parts_seconds' + -'short_circuit_function_evaluation_for_nulls' + -'short_circuit_function_evaluation_for_nulls_threshold' + -'prefer_warmed_unmerged_parts_seconds' + -'iceberg_timestamp_ms' + -'iceberg_snapshot_id' + -'allow_deprecated_error_prone_window_functions' + -'use_iceberg_partition_pruning' + -'allow_deprecated_snowflake_conversion_functions' + -'optimize_distinct_in_order' + -'keeper_map_strict_mode' + -'extract_key_value_pairs_max_pairs_per_row' + -'extract_kvp_max_pairs_per_row' + -'restore_replace_external_engines_to_null' + -'restore_replace_external_table_functions_to_null' + -'restore_replace_external_dictionary_source_to_null' + -'allow_experimental_parallel_reading_from_replicas' + -'enable_parallel_replicas' + -'max_parallel_replicas' + -'parallel_replicas_mode' + -'parallel_replicas_count' + -'parallel_replica_offset' + -'parallel_replicas_custom_key' + -'parallel_replicas_custom_key_range_lower' + -'parallel_replicas_custom_key_range_upper' + -'cluster_for_parallel_replicas' + -'parallel_replicas_allow_in_with_subquery' + -'parallel_replicas_for_non_replicated_merge_tree' + -'parallel_replicas_min_number_of_rows_per_replica' + -'parallel_replicas_prefer_local_join' + -'parallel_replicas_mark_segment_size' + -'parallel_replicas_local_plan' + -'parallel_replicas_index_analysis_only_on_coordinator' + -'parallel_replicas_only_with_analyzer' + -'parallel_replicas_for_cluster_engines' + -'allow_experimental_analyzer' + -'enable_analyzer' + -'analyzer_compatibility_join_using_top_level_identifier' + -'session_timezone' + -'create_if_not_exists' + -'enforce_strict_identifier_format' + -'mongodb_throw_on_unsupported_query' + -'implicit_select' + -'optimize_extract_common_expressions' + -'optimize_and_compare_chain' + -'push_external_roles_in_interserver_queries' + -'shared_merge_tree_sync_parts_on_partition_operations' + -'allow_experimental_variant_type' + -'enable_variant_type' + -'allow_experimental_dynamic_type' + -'enable_dynamic_type' + -'allow_experimental_json_type' + -'enable_json_type' + -'allow_general_join_planning' + -'merge_table_max_tables_to_look_for_schema_inference' + -'validate_enum_literals_in_operators' + -'max_autoincrement_series' + -'use_hive_partitioning' + -'apply_settings_from_server' + -'allow_experimental_materialized_postgresql_table' + -'allow_experimental_funnel_functions' + -'allow_experimental_nlp_functions' + -'allow_experimental_hash_functions' + -'allow_experimental_object_type' + -'allow_experimental_time_series_table' + -'allow_experimental_vector_similarity_index' + -'allow_experimental_codecs' + -'allow_experimental_shared_set_join' + -'max_limit_for_ann_queries' + -'hnsw_candidate_list_size_for_search' + -'throw_on_unsupported_query_inside_transaction' + -'wait_changes_become_visible_after_commit_mode' + -'implicit_transaction' + -'grace_hash_join_initial_buckets' + -'grace_hash_join_max_buckets' + -'join_to_sort_minimum_perkey_rows' + -'join_to_sort_maximum_table_rows' + -'allow_experimental_join_right_table_sorting' + -'allow_statistics_optimize' + -'allow_statistic_optimize' + -'allow_experimental_statistics' + -'allow_experimental_statistic' + -'allow_archive_path_syntax' + -'allow_experimental_inverted_index' + -'allow_experimental_full_text_index' + -'allow_experimental_join_condition' + -'allow_experimental_live_view' + -'live_view_heartbeat_interval' + -'max_live_view_insert_blocks_before_refresh' + -'allow_experimental_window_view' + -'window_view_clean_interval' + -'window_view_heartbeat_interval' + -'wait_for_window_view_fire_signal_timeout' + -'stop_refreshable_materialized_views_on_startup' + -'allow_experimental_database_materialized_postgresql' + -'allow_experimental_query_deduplication' + -'allow_experimental_database_iceberg' + -'allow_experimental_database_unity_catalog' + -'allow_experimental_database_glue_catalog' + -'allow_experimental_kusto_dialect' + -'allow_experimental_prql_dialect' + -'enable_adaptive_memory_spill_scheduler' + -'allow_experimental_ts_to_grid_aggregate_function' + -'update_insert_deduplication_token_in_dependent_materialized_views' + -'max_memory_usage_for_all_queries' + -'multiple_joins_rewriter_version' + -'enable_debug_queries' + -'allow_experimental_database_atomic' + -'allow_experimental_bigint_types' + -'allow_experimental_window_functions' + -'allow_experimental_geo_types' + -'allow_experimental_query_cache' + -'allow_experimental_alter_materialized_view_structure' + -'allow_experimental_shared_merge_tree' + -'allow_experimental_database_replicated' + -'allow_experimental_refreshable_materialized_view' + -'allow_experimental_bfloat16_type' + -'async_insert_stale_timeout_ms' + -'handle_kafka_error_mode' + -'database_replicated_ddl_output' + -'replication_alter_columns_timeout' + -'odbc_max_field_size' + -'allow_experimental_map_type' + -'merge_tree_clear_old_temporary_directories_interval_seconds' + -'merge_tree_clear_old_parts_interval_seconds' + -'partial_merge_join_optimizations' + -'max_alter_threads' + -'use_mysql_types_in_show_columns' + -'s3queue_allow_experimental_sharded_mode' + -'lightweight_mutation_projection_mode' + -'background_buffer_flush_schedule_pool_size' + -'background_pool_size' + -'background_merges_mutations_concurrency_ratio' + -'background_move_pool_size' + -'background_fetches_pool_size' + -'background_common_pool_size' + -'background_schedule_pool_size' + -'background_message_broker_schedule_pool_size' + -'background_distributed_schedule_pool_size' + -'max_remote_read_network_bandwidth_for_server' + -'max_remote_write_network_bandwidth_for_server' + -'async_insert_threads' + -'max_replicated_fetches_network_bandwidth_for_server' + -'max_replicated_sends_network_bandwidth_for_server' + -'max_entries_for_hash_table_stats' + -'default_database_engine' + -'max_pipeline_depth' + -'temporary_live_view_timeout' + -'async_insert_cleanup_timeout_ms' + -'optimize_fuse_sum_count_avg' + -'drain_timeout' + -'backup_threads' + -'restore_threads' + -'optimize_duplicate_order_by_and_distinct' + -'parallel_replicas_min_number_of_granules_to_enable' + -'parallel_replicas_custom_key_filter_type' + -'query_plan_optimize_projection' + -'query_cache_store_results_of_queries_with_nondeterministic_functions' + -'allow_experimental_annoy_index' + -'max_threads_for_annoy_index_creation' + -'annoy_index_search_k_nodes' + -'allow_experimental_usearch_index' + -'optimize_move_functions_out_of_any' + -'allow_experimental_undrop_table_query' + -'allow_experimental_s3queue' + -'query_plan_optimize_primary_key' + -'optimize_monotonous_functions_in_order_by' + -'http_max_chunk_size' + -'iceberg_engine_ignore_schema_evolution' + -'parallel_replicas_single_task_marks_count_multiplier' + -'allow_experimental_database_materialized_mysql' + -'format_csv_delimiter' + -'format_csv_allow_single_quotes' + -'format_csv_allow_double_quotes' + -'output_format_csv_serialize_tuple_into_separate_columns' + -'input_format_csv_deserialize_separate_columns_into_tuple' + -'output_format_csv_crlf_end_of_line' + -'input_format_csv_allow_cr_end_of_line' + -'input_format_csv_enum_as_number' + -'input_format_csv_arrays_as_nested_csv' + -'input_format_skip_unknown_fields' + -'input_format_with_names_use_header' + -'input_format_with_types_use_header' + -'input_format_import_nested_json' + -'input_format_defaults_for_omitted_fields' + -'input_format_csv_empty_as_default' + -'input_format_tsv_empty_as_default' + -'input_format_tsv_enum_as_number' + -'input_format_null_as_default' + -'input_format_force_null_for_omitted_fields' + -'input_format_arrow_case_insensitive_column_matching' + -'input_format_orc_row_batch_size' + -'input_format_orc_case_insensitive_column_matching' + -'input_format_parquet_case_insensitive_column_matching' + -'input_format_parquet_preserve_order' + -'input_format_parquet_filter_push_down' + -'input_format_parquet_bloom_filter_push_down' + -'input_format_parquet_use_native_reader' + -'input_format_allow_seeks' + -'input_format_orc_allow_missing_columns' + -'input_format_orc_use_fast_decoder' + -'input_format_orc_filter_push_down' + -'input_format_orc_reader_time_zone_name' + -'input_format_orc_dictionary_as_low_cardinality' + -'input_format_parquet_allow_missing_columns' + -'input_format_parquet_local_file_min_bytes_for_seek' + -'input_format_parquet_enable_row_group_prefetch' + -'input_format_arrow_allow_missing_columns' + -'input_format_hive_text_fields_delimiter' + -'input_format_hive_text_collection_items_delimiter' + -'input_format_hive_text_map_keys_delimiter' + -'input_format_hive_text_allow_variable_number_of_columns' + -'input_format_msgpack_number_of_columns' + -'output_format_msgpack_uuid_representation' + -'input_format_max_rows_to_read_for_schema_inference' + -'input_format_max_bytes_to_read_for_schema_inference' + -'input_format_csv_use_best_effort_in_schema_inference' + -'input_format_csv_try_infer_numbers_from_strings' + -'input_format_csv_try_infer_strings_from_quoted_tuples' + -'input_format_tsv_use_best_effort_in_schema_inference' + -'input_format_csv_detect_header' + -'input_format_csv_allow_whitespace_or_tab_as_delimiter' + -'input_format_csv_trim_whitespaces' + -'input_format_csv_use_default_on_bad_values' + -'input_format_csv_allow_variable_number_of_columns' + -'input_format_tsv_allow_variable_number_of_columns' + -'input_format_custom_allow_variable_number_of_columns' + -'input_format_json_compact_allow_variable_number_of_columns' + -'input_format_tsv_detect_header' + -'input_format_custom_detect_header' + -'input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference' + -'input_format_parquet_max_block_size' + -'input_format_parquet_prefer_block_bytes' + -'input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference' + -'input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference' + -'input_format_orc_skip_columns_with_unsupported_types_in_schema_inference' + -'input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference' + -'column_names_for_schema_inference' + -'schema_inference_hints' + -'schema_inference_mode' + -'schema_inference_make_columns_nullable' + -'schema_inference_make_json_columns_nullable' + -'input_format_json_read_bools_as_numbers' + -'input_format_json_read_bools_as_strings' + -'input_format_json_try_infer_numbers_from_strings' + -'input_format_json_validate_types_from_metadata' + -'input_format_json_read_numbers_as_strings' + -'input_format_json_read_objects_as_strings' + -'input_format_json_read_arrays_as_strings' + -'input_format_json_try_infer_named_tuples_from_objects' + -'input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects' + -'input_format_json_infer_incomplete_types_as_strings' + -'input_format_json_named_tuples_as_objects' + -'input_format_json_ignore_unknown_keys_in_named_tuple' + -'input_format_json_defaults_for_missing_elements_in_named_tuple' + -'input_format_json_throw_on_bad_escape_sequence' + -'input_format_json_ignore_unnecessary_fields' + -'input_format_try_infer_variants' + -'type_json_skip_duplicated_paths' + -'input_format_json_max_depth' + -'input_format_json_empty_as_default' + -'input_format_try_infer_integers' + -'input_format_try_infer_dates' + -'input_format_try_infer_datetimes' + -'input_format_try_infer_datetimes_only_datetime64' + -'input_format_try_infer_exponent_floats' + -'output_format_markdown_escape_special_characters' + -'input_format_protobuf_flatten_google_wrappers' + -'output_format_protobuf_nullables_with_google_wrappers' + -'input_format_csv_skip_first_lines' + -'input_format_tsv_skip_first_lines' + -'input_format_csv_skip_trailing_empty_lines' + -'input_format_tsv_skip_trailing_empty_lines' + -'input_format_custom_skip_trailing_empty_lines' + -'input_format_tsv_crlf_end_of_line' + -'input_format_native_allow_types_conversion' + -'input_format_native_decode_types_in_binary_format' + -'output_format_native_encode_types_in_binary_format' + -'output_format_native_write_json_as_string' + -'date_time_input_format' + -'date_time_output_format' + -'interval_output_format' + -'date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands' + -'input_format_ipv4_default_on_conversion_error' + -'input_format_ipv6_default_on_conversion_error' + -'bool_true_representation' + -'bool_false_representation' + -'input_format_values_interpret_expressions' + -'input_format_values_deduce_templates_of_expressions' + -'input_format_values_accurate_types_of_literals' + -'input_format_avro_allow_missing_fields' + -'input_format_avro_null_as_default' + -'format_binary_max_string_size' + -'format_binary_max_array_size' + -'input_format_binary_decode_types_in_binary_format' + -'output_format_binary_encode_types_in_binary_format' + -'format_avro_schema_registry_url' + -'input_format_binary_read_json_as_string' + -'output_format_binary_write_json_as_string' + -'output_format_json_quote_64bit_integers' + -'output_format_json_quote_denormals' + -'output_format_json_quote_decimals' + -'output_format_json_quote_64bit_floats' + -'output_format_json_escape_forward_slashes' + -'output_format_json_named_tuples_as_objects' + -'output_format_json_skip_null_value_in_named_tuples' + -'output_format_json_array_of_rows' + -'output_format_json_validate_utf8' + -'output_format_json_pretty_print' + -'format_json_object_each_row_column_for_object_name' + -'output_format_pretty_max_rows' + -'output_format_pretty_max_column_pad_width' + -'output_format_pretty_max_column_name_width_cut_to' + -'output_format_pretty_max_column_name_width_min_chars_to_cut' + -'output_format_pretty_max_value_width' + -'output_format_pretty_max_value_width_apply_for_single_value' + -'output_format_pretty_squash_consecutive_ms' + -'output_format_pretty_squash_max_wait_ms' + -'output_format_pretty_color' + -'output_format_pretty_grid_charset' + -'output_format_pretty_display_footer_column_names' + -'output_format_pretty_display_footer_column_names_min_rows' + -'output_format_parquet_row_group_size' + -'output_format_parquet_row_group_size_bytes' + -'output_format_parquet_string_as_string' + -'output_format_parquet_fixed_string_as_fixed_byte_array' + -'output_format_parquet_version' + -'output_format_parquet_compression_method' + -'output_format_parquet_compliant_nested_types' + -'output_format_parquet_use_custom_encoder' + -'output_format_parquet_parallel_encoding' + -'output_format_parquet_data_page_size' + -'output_format_parquet_batch_size' + -'output_format_parquet_write_page_index' + -'output_format_parquet_write_bloom_filter' + -'output_format_parquet_bloom_filter_bits_per_value' + -'output_format_parquet_bloom_filter_flush_threshold_bytes' + -'output_format_parquet_datetime_as_uint32' + -'output_format_avro_codec' + -'output_format_avro_sync_interval' + -'output_format_avro_string_column_pattern' + -'output_format_avro_rows_in_file' + -'output_format_tsv_crlf_end_of_line' + -'format_csv_null_representation' + -'format_tsv_null_representation' + -'output_format_decimal_trailing_zeros' + -'input_format_allow_errors_num' + -'input_format_allow_errors_ratio' + -'input_format_record_errors_file_path' + -'errors_output_format' + -'format_schema' + -'format_template_resultset' + -'format_template_row' + -'format_template_row_format' + -'format_template_resultset_format' + -'format_template_rows_between_delimiter' + -'format_custom_escaping_rule' + -'format_custom_field_delimiter' + -'format_custom_row_before_delimiter' + -'format_custom_row_after_delimiter' + -'format_custom_row_between_delimiter' + -'format_custom_result_before_delimiter' + -'format_custom_result_after_delimiter' + -'format_regexp' + -'format_regexp_escaping_rule' + -'format_regexp_skip_unmatched' + -'output_format_write_statistics' + -'output_format_pretty_row_numbers' + -'output_format_pretty_highlight_digit_groups' + -'output_format_pretty_single_large_number_tip_threshold' + -'output_format_pretty_highlight_trailing_spaces' + -'output_format_pretty_multiline_fields' + -'output_format_pretty_fallback_to_vertical' + -'output_format_pretty_fallback_to_vertical_max_rows_per_chunk' + -'output_format_pretty_fallback_to_vertical_min_table_width' + -'output_format_pretty_fallback_to_vertical_min_columns' + -'insert_distributed_one_random_shard' + -'exact_rows_before_limit' + -'rows_before_aggregation' + -'cross_to_inner_join_rewrite' + -'output_format_arrow_low_cardinality_as_dictionary' + -'output_format_arrow_use_signed_indexes_for_dictionary' + -'output_format_arrow_use_64_bit_indexes_for_dictionary' + -'output_format_arrow_string_as_string' + -'output_format_arrow_fixed_string_as_fixed_byte_array' + -'output_format_arrow_compression_method' + -'output_format_orc_string_as_string' + -'output_format_orc_compression_method' + -'output_format_orc_row_index_stride' + -'output_format_orc_dictionary_key_size_threshold' + -'output_format_orc_writer_time_zone_name' + -'format_capn_proto_enum_comparising_mode' + -'format_capn_proto_use_autogenerated_schema' + -'format_protobuf_use_autogenerated_schema' + -'output_format_schema' + -'input_format_mysql_dump_table_name' + -'input_format_mysql_dump_map_column_names' + -'output_format_sql_insert_max_batch_size' + -'output_format_sql_insert_table_name' + -'output_format_sql_insert_include_column_names' + -'output_format_sql_insert_use_replace' + -'output_format_sql_insert_quote_names' + -'output_format_values_escape_quote_with_quote' + -'output_format_bson_string_as_string' + -'input_format_bson_skip_fields_with_unsupported_types_in_schema_inference' + -'format_display_secrets_in_show_and_select' + -'regexp_dict_allow_hyperscan' + -'regexp_dict_flag_case_insensitive' + -'regexp_dict_flag_dotall' + -'dictionary_use_async_executor' + -'precise_float_parsing' + -'date_time_overflow_behavior' + -'validate_experimental_and_suspicious_types_inside_nested_types' + -'show_create_query_identifier_quoting_rule' + -'show_create_query_identifier_quoting_style' + -'input_format_arrow_import_nested' + -'input_format_parquet_import_nested' + -'input_format_orc_import_nested' + -'output_format_enable_streaming' diff --git a/styles/ClickHouse/BackTicksTableEngines.yaml b/styles/ClickHouse/BackTicksTableEngines.yaml new file mode 100644 index 00000000000..395727692e3 --- /dev/null +++ b/styles/ClickHouse/BackTicksTableEngines.yaml @@ -0,0 +1,70 @@ +extends: existence +message: "ClickHouse table engines '%s' should be enclosed in backticks." +level: suggestion +ignorecase: true +tokens: + -'OSS' + -'AzureBlobStorage' + -'KeeperMap' + -'S3' + -'MaterializedPostgreSQL' + -'PostgreSQL' + -'NATS' + -'COSN' + -'Redis' + -'MongoDB' + -'MySQL' + -'S3Queue' + -'Distributed' + -'ReplicatedSummingMergeTree' + -'ExecutablePool' + -'IcebergLocal' + -'ODBC' + -'Hive' + -'View' + -'FuzzQuery' + -'Loop' + -'MaterializedView' + -'Join' + -'Executable' + -'Kafka' + -'Set' + -'Dictionary' + -'URL' + -'ReplicatedVersionedCollapsingMergeTree' + -'File' + -'IcebergS3' + -'Iceberg' + -'GenerateRandom' + -'LiveView' + -'Memory' + -'Merge' + -'WindowView' + -'Null' + -'SQLite' + -'VersionedCollapsingMergeTree' + -'ReplacingMergeTree' + -'TimeSeries' + -'HDFS' + -'EmbeddedRocksDB' + -'ReplicatedCollapsingMergeTree' + -'IcebergHDFS' + -'ReplicatedGraphiteMergeTree' + -'IcebergAzure' + -'ReplicatedMergeTree' + -'Hudi' + -'TinyLog' + -'FuzzJSON' + -'ReplicatedReplacingMergeTree' + -'JDBC' + -'SummingMergeTree' + -'MergeTree' + -'GraphiteMergeTree' + -'CollapsingMergeTree' + -'ReplicatedAggregatingMergeTree' + -'RabbitMQ' + -'Buffer' + -'AzureQueue' + -'AggregatingMergeTree' + -'StripeLog' + -'Log' diff --git a/styles/ClickHouse/BackTicksTableFunctions.yaml b/styles/ClickHouse/BackTicksTableFunctions.yaml new file mode 100644 index 00000000000..859354740fe --- /dev/null +++ b/styles/ClickHouse/BackTicksTableFunctions.yaml @@ -0,0 +1,64 @@ +extends: existence +message: "ClickHouse table engines '%s' should be enclosed in backticks." +level: suggestion +ignorecase: true +tokens: + -'hudiCluster' + -'icebergAzureCluster' + -'icebergS3Cluster' + -'icebergLocal' + -'icebergHDFS' + -'icebergAzure' + -'icebergS3' + -'iceberg' + -'hdfsCluster' + -'azureBlobStorageCluster' + -'oss' + -'timeSeriesMetrics' + -'fuzzQuery' + -'timeSeriesData' + -'format' + -'loop' + -'postgresql' + -'clusterAllReplicas' + -'viewIfPermitted' + -'view' + -'jdbc' + -'icebergHDFSCluster' + -'s3Cluster' + -'timeSeriesTags' + -'hive' + -'hdfs' + -'dictionary' + -'numbers_mt' + -'mergeTreeIndex' + -'hudi' + -'s3' + -'cosn' + -'generateRandom' + -'merge' + -'url' + -'zeros_mt' + -'executable' + -'fuzzJSON' + -'urlCluster' + -'fileCluster' + -'values' + -'file' + -'redis' + -'zeros' + -'input' + -'mysql' + -'odbc' + -'generateSeries' + -'mongodb' + -'generate_series' + -'sqlite' + -'cluster' + -'gcs' + -'remoteSecure' + -'numbers' + -'azureBlobStorage' + -'viewExplain' + -'null' + -'remote' diff --git a/styles/ClickHouse/EOLWhitespace.yaml b/styles/ClickHouse/EOLWhitespace.yaml new file mode 100644 index 00000000000..1ed600349a5 --- /dev/null +++ b/styles/ClickHouse/EOLWhitespace.yaml @@ -0,0 +1,12 @@ +--- +name: gitlab_base.EOLWhitespace +description: | + Checks that there is no useless whitespace at the end of lines. +extends: existence +message: "Remove whitespace characters from the end of the line." +link: https://docs.gitlab.com/development/documentation/styleguide/ +vocab: false +level: warning +scope: raw +raw: + - ' +\n' diff --git a/styles/ClickHouse/Exclamation.yml b/styles/ClickHouse/Exclamation.yaml similarity index 100% rename from styles/ClickHouse/Exclamation.yml rename to styles/ClickHouse/Exclamation.yaml diff --git a/styles/ClickHouse/FutureTense.yaml b/styles/ClickHouse/FutureTense.yaml new file mode 100644 index 00000000000..6982a3f1f1b --- /dev/null +++ b/styles/ClickHouse/FutureTense.yaml @@ -0,0 +1,15 @@ +--- +name: gitlab_base.FutureTense +description: | + Checks for use of future tense in sentences. + Present tense is strongly preferred. +extends: existence +message: "Instead of future tense '%s', use present tense." +ignorecase: true +nonword: true +vocab: false +level: warning +link: https://docs.gitlab.com/development/documentation/styleguide/word_list/#future-tense +tokens: + - (going to|will|won't)[ \n:]\w* + - (It?|we|you|they)'ll[ \n:]\w* diff --git a/styles/ClickHouse/HeadingPunctuation.yml b/styles/ClickHouse/HeadingPunctuation.yaml similarity index 95% rename from styles/ClickHouse/HeadingPunctuation.yml rename to styles/ClickHouse/HeadingPunctuation.yaml index c1729868b64..30dad70f665 100644 --- a/styles/ClickHouse/HeadingPunctuation.yml +++ b/styles/ClickHouse/HeadingPunctuation.yaml @@ -2,7 +2,7 @@ extends: existence message: "Don't put a period at the end of a heading." link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings" nonword: true -level: warning +level: error scope: heading action: name: edit diff --git a/styles/ClickHouse/Headings.yml b/styles/ClickHouse/Headings.yaml similarity index 94% rename from styles/ClickHouse/Headings.yml rename to styles/ClickHouse/Headings.yaml index a26b1c32219..ff8a2565d66 100644 --- a/styles/ClickHouse/Headings.yml +++ b/styles/ClickHouse/Headings.yaml @@ -1,7 +1,7 @@ extends: capitalization message: "'%s' should use sentence-style capitalization." link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings" -level: warning +level: error scope: heading match: $sentence indicators: @@ -28,3 +28,4 @@ exceptions: - VS - Windows - JSON + - MergeTree diff --git a/styles/ClickHouse/Ordinal.yaml b/styles/ClickHouse/Ordinal.yaml new file mode 100644 index 00000000000..d1ac7d27e80 --- /dev/null +++ b/styles/ClickHouse/Ordinal.yaml @@ -0,0 +1,7 @@ +extends: existence +message: "Spell out all ordinal numbers ('%s') in text." +link: 'https://developers.google.com/style/numbers' +level: error +nonword: true +tokens: + - \d+(?:st|nd|rd|th) diff --git a/styles/ClickHouse/OxfordComma.yaml b/styles/ClickHouse/OxfordComma.yaml new file mode 100644 index 00000000000..07ca7adfdc7 --- /dev/null +++ b/styles/ClickHouse/OxfordComma.yaml @@ -0,0 +1,13 @@ + +--- +name: gitlab_base.OxfordComma +description: | + Checks for the lack of an Oxford comma. In some cases, will catch overly + complex sentence structures with lots of commas. +extends: existence +message: "Use a comma before the last 'and' or 'or' in a list of four or more items." +link: https://docs.gitlab.com/development/documentation/styleguide/#punctuation +vocab: false +level: warning +raw: + - '(?:[\w-_` ]+,){2,}(?:[\w-_` ]+) (and |or )' diff --git a/styles/ClickHouse/Quotes.yml b/styles/ClickHouse/Quotes.yaml similarity index 92% rename from styles/ClickHouse/Quotes.yml rename to styles/ClickHouse/Quotes.yaml index 3cb6f1abd18..ba3bcfca686 100644 --- a/styles/ClickHouse/Quotes.yml +++ b/styles/ClickHouse/Quotes.yaml @@ -1,7 +1,7 @@ extends: existence message: "Commas and periods go inside quotation marks." link: 'https://developers.google.com/style/quotation-marks' -level: error +level: warning nonword: true tokens: - '"[^"]+"[.,?]' diff --git a/styles/ClickHouse/Repetition.yaml b/styles/ClickHouse/Repetition.yaml new file mode 100644 index 00000000000..bf492bc6efa --- /dev/null +++ b/styles/ClickHouse/Repetition.yaml @@ -0,0 +1,11 @@ +--- +name: gitlab_base.Repetition +description: | + Checks for duplicate words, like `the the` or `and and`. +extends: repetition +message: "Remove this duplicate word: '%s'." +vocab: false +level: error +alpha: true +tokens: + - '[^\s]+' diff --git a/styles/ClickHouse/Units.yaml b/styles/ClickHouse/Units.yaml new file mode 100644 index 00000000000..7239cec4553 --- /dev/null +++ b/styles/ClickHouse/Units.yaml @@ -0,0 +1,14 @@ +--- +name: gitlab_base.Units +description: | + Recommends a space between a number and a unit of measure. +extends: existence +message: "Add a space between the number and the unit in '%s'." +link: 'https://docs.gitlab.com/development/documentation/styleguide/' +vocab: false +nonword: true +level: warning +ignorecase: true +tokens: + - \d+(?:B|kB|KiB|MB|MiB|GB|GiB|TB|TiB) + - \d+(?:ns|ms|μs|s|min|h|d)\b diff --git a/styles/ClickHouse/Uppercase.yaml b/styles/ClickHouse/Uppercase.yaml new file mode 100644 index 00000000000..63cf4cf6512 --- /dev/null +++ b/styles/ClickHouse/Uppercase.yaml @@ -0,0 +1,272 @@ +--- +name: gitlab_base.Uppercase +description: | + Checks for use of all uppercase letters with unknown reason. +extends: conditional +message: "Instead of uppercase for '%s', use lowercase or backticks (`) if possible. Otherwise, ask a Technical Writer to add this word or acronym to the rule's exception list." +link: https://docs.gitlab.com/development/documentation/testing/vale/#uppercase-acronym-test +vocab: false +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - ACL + - AJAX + - ALL + - AMI + - ANSI + - APAC + - API + - APM + - ARIA + - ARM + - ARN + - ASCII + - ASG + - AST + - AWS + - BETA + - BMP + - BSD + - CAS + - CDN + - CGI + - CIDR + - CLI + - CNA + - CNCF + - CORE + - CORS + - CPU + - CRAN + - CRIME + - CRM + - CRUD + - CSRF + - CSS + - CSV + - CTE + - CVE + - CVS + - CVSS + - CWE + - DAST + - DDL + - DHCP + - DML + - DNS + - DOM + - DORA + - DSA + - DSL + - DSN + - DUOENT + - DUOPRO + - DVCS + - DVD + - EBS + - ECDSA + - ECS + - EFS + - EKS + - ELB + - ENA + - EOL + - EWM + - EXIF + - FAQ + - FIDO + - FIFO + - FIPS + - FLAG + - FOSS + - FQDN + - FREE + - FTP + - GCP + - GDK + - GDPR + - GET + - GID + - GIF + - GKE + - GLEX + - GLFM + - GNU + - GPG + - GPL + - GPS + - GPT + - GPU + - GUI + - HAML + - HAR + - HDD + - HEAD + - HIPAA + - HLL + - HSTS + - HTML + - HTTP + - HTTPS + - IAM + - IANA + - IBM + - ICO + - IDE + - IID + - IIS + - IMAP + - IOPS + - IRC + - ISO + - JPEG + - JPG + - JSON + - JSONB + - JVM + - JWT + - KICS + - LAN + - LDAP + - LDAPS + - LESS + - LFS + - LLM + - LRU + - LSIF + - LTM + - LTS + - LTSS + - LVM + - MIME + - MIT + - MITRE + - MVC + - NAS + - NAT + - NDA + - NFS + - NGINX + - NOTE + - NPM + - NTP + - OCI + - OIDC + - OKD + - OKR + - ONLY + - OSS + - OTP + - OWASP + - PAT + - PCI-DSS + - PDF + - PEM + - PEP + - PGP + - PHP + - PID + - PKCS + - PMD + - PNG + - POC + - POSIX + - POST + - PROXY + - PUT + - QPS + - RAID + - RAM + - RBAC + - RDP + - RDS + - REST + - RFC + - RHEL + - RPC + - RPM + - RPO + - RPS + - RSA + - RSS + - RTC + - RTO + - RVM + - SAAS + - SAML + - SAN + - SAST + - SATA + - SBOM + - SBT + - SCIM + - SCM + - SCP + - SCSS + - SDK + - SELF + - SEO + - SES + - SFTP + - SHA + - SKI + - SLA + - SLI + - SLO + - SLSA + - SMS + - SMTP + - SOAP + - SOC + - SOX + - SPDX + - SPDY + - SPF + - SQL + - SRE + - SSD + - SSF + - SSG + - SSH + - SSL + - SSO + - STI + - SUSE + - SVG + - SVN + - TCP + - TIFF + - TIP + - TLD + - TLS + - TODO + - TOML + - TOTP + - TPS + - TTL + - UBI + - UDP + - UID + - UNIX + - URI + - URL + - USB + - UTC + - UTF + - UUID + - VCS + - VPC + - VPN + - WAF + - WEBP + - WIP + - WSL + - XML + - XSS + - YAML + - ZAP + - ZIP diff --git a/styles/ClickHouse/Wordy.yaml b/styles/ClickHouse/Wordy.yaml new file mode 100644 index 00000000000..5194f669425 --- /dev/null +++ b/styles/ClickHouse/Wordy.yaml @@ -0,0 +1,20 @@ + +--- +name: gitlab_base.Wordy +description: | + Suggests shorter versions of wordy phrases. +extends: substitution +message: "%s" +link: https://docs.gitlab.com/development/documentation/styleguide/word_list/ +vocab: false +level: suggestion +ignorecase: true +swap: + a number of: "Specify the number or remove the phrase." + as well as: "Use 'and' instead of 'as well as'." + note that: "Remove the phrase 'note that'." + please: "Use 'please' only if we've inconvenienced the user." + respectively: "Remove 'respectively' and list each option instead." + and so on: "Remove 'and so on'. Try to use 'like' and provide examples instead." + in order to: "Remove 'in order' and leave 'to'." + quite: "Remove 'quite', as it's wordy." From 2150036c2f289b78561230e535a985ddb03273c7 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:38:52 +0200 Subject: [PATCH 32/40] Change min alert level to error --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index 3956a8b4fc5..5067975a985 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,5 @@ StylesPath = styles -MinAlertLevel = suggestion +MinAlertLevel = error [*.{md}] BasedOnStyles = ClickHouse From 3adf47412d0f09d31bb0bf354065f66a0bed158c Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:52:44 +0200 Subject: [PATCH 33/40] Add some more test mistakes --- .vale.ini | 2 +- docs/best-practices/json_type.md | 2 +- styles/ClickHouse/{Ability.yaml => Ability.yml} | 0 .../ClickHouse/{BackTicksFormats.yaml => BackTicksFormats.yml} | 0 .../{BackTicksFunctions.yaml => BackTicksFunctions.yml} | 0 ...BackTicksServerSettings.yaml => BackTicksServerSettings.yml} | 0 ...ckTicksSessionSettings.yaml => BackTicksSessionSettings.yml} | 0 .../{BackTicksTableEngines.yaml => BackTicksTableEngines.yml} | 0 ...BackTicksTableFunctions.yaml => BackTicksTableFunctions.yml} | 0 styles/ClickHouse/{BadPlurals.yaml => BadPlurals.yml} | 0 styles/ClickHouse/{British.yaml => British.yml} | 0 styles/ClickHouse/{CodeblockFences.yaml => CodeblockFences.yml} | 0 styles/ClickHouse/{CurrentStatus.yaml => CurrentStatus.yml} | 0 styles/ClickHouse/{EOLWhitespace.yaml => EOLWhitespace.yml} | 0 styles/ClickHouse/{Exclamation.yaml => Exclamation.yml} | 0 styles/ClickHouse/{FutureTense.yaml => FutureTense.yml} | 0 .../{HeadingPunctuation.yaml => HeadingPunctuation.yml} | 0 styles/ClickHouse/{Headings.yaml => Headings.yml} | 0 styles/ClickHouse/{Ordinal.yaml => Ordinal.yml} | 0 styles/ClickHouse/{OxfordComma.yaml => OxfordComma.yml} | 0 styles/ClickHouse/{Quotes.yaml => Quotes.yml} | 0 styles/ClickHouse/{Repetition.yaml => Repetition.yml} | 0 styles/ClickHouse/{SentenceLength.yaml => SentenceLength.yml} | 0 styles/ClickHouse/{Units.yaml => Units.yml} | 0 styles/ClickHouse/{Uppercase.yaml => Uppercase.yml} | 0 styles/ClickHouse/{Wordy.yaml => Wordy.yml} | 0 26 files changed, 2 insertions(+), 2 deletions(-) rename styles/ClickHouse/{Ability.yaml => Ability.yml} (100%) rename styles/ClickHouse/{BackTicksFormats.yaml => BackTicksFormats.yml} (100%) rename styles/ClickHouse/{BackTicksFunctions.yaml => BackTicksFunctions.yml} (100%) rename styles/ClickHouse/{BackTicksServerSettings.yaml => BackTicksServerSettings.yml} (100%) rename styles/ClickHouse/{BackTicksSessionSettings.yaml => BackTicksSessionSettings.yml} (100%) rename styles/ClickHouse/{BackTicksTableEngines.yaml => BackTicksTableEngines.yml} (100%) rename styles/ClickHouse/{BackTicksTableFunctions.yaml => BackTicksTableFunctions.yml} (100%) rename styles/ClickHouse/{BadPlurals.yaml => BadPlurals.yml} (100%) rename styles/ClickHouse/{British.yaml => British.yml} (100%) rename styles/ClickHouse/{CodeblockFences.yaml => CodeblockFences.yml} (100%) rename styles/ClickHouse/{CurrentStatus.yaml => CurrentStatus.yml} (100%) rename styles/ClickHouse/{EOLWhitespace.yaml => EOLWhitespace.yml} (100%) rename styles/ClickHouse/{Exclamation.yaml => Exclamation.yml} (100%) rename styles/ClickHouse/{FutureTense.yaml => FutureTense.yml} (100%) rename styles/ClickHouse/{HeadingPunctuation.yaml => HeadingPunctuation.yml} (100%) rename styles/ClickHouse/{Headings.yaml => Headings.yml} (100%) rename styles/ClickHouse/{Ordinal.yaml => Ordinal.yml} (100%) rename styles/ClickHouse/{OxfordComma.yaml => OxfordComma.yml} (100%) rename styles/ClickHouse/{Quotes.yaml => Quotes.yml} (100%) rename styles/ClickHouse/{Repetition.yaml => Repetition.yml} (100%) rename styles/ClickHouse/{SentenceLength.yaml => SentenceLength.yml} (100%) rename styles/ClickHouse/{Units.yaml => Units.yml} (100%) rename styles/ClickHouse/{Uppercase.yaml => Uppercase.yml} (100%) rename styles/ClickHouse/{Wordy.yaml => Wordy.yml} (100%) diff --git a/.vale.ini b/.vale.ini index 5067975a985..3956a8b4fc5 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,5 @@ StylesPath = styles -MinAlertLevel = error +MinAlertLevel = suggestion [*.{md}] BasedOnStyles = ClickHouse diff --git a/docs/best-practices/json_type.md b/docs/best-practices/json_type.md index 7bd15ce05ad..a570fb5f2de 100644 --- a/docs/best-practices/json_type.md +++ b/docs/best-practices/json_type.md @@ -24,7 +24,7 @@ If your data structure is known and consistent, there is rarely a need for the J You can also mix approaches - for example, use static columns for predictable top-level fields and a single JSON column for a dynamic section of the payload. -## Considerations and tips for using JSON {#considerations-and-tips-for-using-json} +## Considerations And Tips for using json {#considerations-and-tips-for-using-json} The JSON type uses British spelling of colour enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: diff --git a/styles/ClickHouse/Ability.yaml b/styles/ClickHouse/Ability.yml similarity index 100% rename from styles/ClickHouse/Ability.yaml rename to styles/ClickHouse/Ability.yml diff --git a/styles/ClickHouse/BackTicksFormats.yaml b/styles/ClickHouse/BackTicksFormats.yml similarity index 100% rename from styles/ClickHouse/BackTicksFormats.yaml rename to styles/ClickHouse/BackTicksFormats.yml diff --git a/styles/ClickHouse/BackTicksFunctions.yaml b/styles/ClickHouse/BackTicksFunctions.yml similarity index 100% rename from styles/ClickHouse/BackTicksFunctions.yaml rename to styles/ClickHouse/BackTicksFunctions.yml diff --git a/styles/ClickHouse/BackTicksServerSettings.yaml b/styles/ClickHouse/BackTicksServerSettings.yml similarity index 100% rename from styles/ClickHouse/BackTicksServerSettings.yaml rename to styles/ClickHouse/BackTicksServerSettings.yml diff --git a/styles/ClickHouse/BackTicksSessionSettings.yaml b/styles/ClickHouse/BackTicksSessionSettings.yml similarity index 100% rename from styles/ClickHouse/BackTicksSessionSettings.yaml rename to styles/ClickHouse/BackTicksSessionSettings.yml diff --git a/styles/ClickHouse/BackTicksTableEngines.yaml b/styles/ClickHouse/BackTicksTableEngines.yml similarity index 100% rename from styles/ClickHouse/BackTicksTableEngines.yaml rename to styles/ClickHouse/BackTicksTableEngines.yml diff --git a/styles/ClickHouse/BackTicksTableFunctions.yaml b/styles/ClickHouse/BackTicksTableFunctions.yml similarity index 100% rename from styles/ClickHouse/BackTicksTableFunctions.yaml rename to styles/ClickHouse/BackTicksTableFunctions.yml diff --git a/styles/ClickHouse/BadPlurals.yaml b/styles/ClickHouse/BadPlurals.yml similarity index 100% rename from styles/ClickHouse/BadPlurals.yaml rename to styles/ClickHouse/BadPlurals.yml diff --git a/styles/ClickHouse/British.yaml b/styles/ClickHouse/British.yml similarity index 100% rename from styles/ClickHouse/British.yaml rename to styles/ClickHouse/British.yml diff --git a/styles/ClickHouse/CodeblockFences.yaml b/styles/ClickHouse/CodeblockFences.yml similarity index 100% rename from styles/ClickHouse/CodeblockFences.yaml rename to styles/ClickHouse/CodeblockFences.yml diff --git a/styles/ClickHouse/CurrentStatus.yaml b/styles/ClickHouse/CurrentStatus.yml similarity index 100% rename from styles/ClickHouse/CurrentStatus.yaml rename to styles/ClickHouse/CurrentStatus.yml diff --git a/styles/ClickHouse/EOLWhitespace.yaml b/styles/ClickHouse/EOLWhitespace.yml similarity index 100% rename from styles/ClickHouse/EOLWhitespace.yaml rename to styles/ClickHouse/EOLWhitespace.yml diff --git a/styles/ClickHouse/Exclamation.yaml b/styles/ClickHouse/Exclamation.yml similarity index 100% rename from styles/ClickHouse/Exclamation.yaml rename to styles/ClickHouse/Exclamation.yml diff --git a/styles/ClickHouse/FutureTense.yaml b/styles/ClickHouse/FutureTense.yml similarity index 100% rename from styles/ClickHouse/FutureTense.yaml rename to styles/ClickHouse/FutureTense.yml diff --git a/styles/ClickHouse/HeadingPunctuation.yaml b/styles/ClickHouse/HeadingPunctuation.yml similarity index 100% rename from styles/ClickHouse/HeadingPunctuation.yaml rename to styles/ClickHouse/HeadingPunctuation.yml diff --git a/styles/ClickHouse/Headings.yaml b/styles/ClickHouse/Headings.yml similarity index 100% rename from styles/ClickHouse/Headings.yaml rename to styles/ClickHouse/Headings.yml diff --git a/styles/ClickHouse/Ordinal.yaml b/styles/ClickHouse/Ordinal.yml similarity index 100% rename from styles/ClickHouse/Ordinal.yaml rename to styles/ClickHouse/Ordinal.yml diff --git a/styles/ClickHouse/OxfordComma.yaml b/styles/ClickHouse/OxfordComma.yml similarity index 100% rename from styles/ClickHouse/OxfordComma.yaml rename to styles/ClickHouse/OxfordComma.yml diff --git a/styles/ClickHouse/Quotes.yaml b/styles/ClickHouse/Quotes.yml similarity index 100% rename from styles/ClickHouse/Quotes.yaml rename to styles/ClickHouse/Quotes.yml diff --git a/styles/ClickHouse/Repetition.yaml b/styles/ClickHouse/Repetition.yml similarity index 100% rename from styles/ClickHouse/Repetition.yaml rename to styles/ClickHouse/Repetition.yml diff --git a/styles/ClickHouse/SentenceLength.yaml b/styles/ClickHouse/SentenceLength.yml similarity index 100% rename from styles/ClickHouse/SentenceLength.yaml rename to styles/ClickHouse/SentenceLength.yml diff --git a/styles/ClickHouse/Units.yaml b/styles/ClickHouse/Units.yml similarity index 100% rename from styles/ClickHouse/Units.yaml rename to styles/ClickHouse/Units.yml diff --git a/styles/ClickHouse/Uppercase.yaml b/styles/ClickHouse/Uppercase.yml similarity index 100% rename from styles/ClickHouse/Uppercase.yaml rename to styles/ClickHouse/Uppercase.yml diff --git a/styles/ClickHouse/Wordy.yaml b/styles/ClickHouse/Wordy.yml similarity index 100% rename from styles/ClickHouse/Wordy.yaml rename to styles/ClickHouse/Wordy.yml From a113ca7d13e63ba27835932a71fa262a932d26db Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:39:57 +0200 Subject: [PATCH 34/40] newline end of file --- scripts/vale/test/changed_lines.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vale/test/changed_lines.json b/scripts/vale/test/changed_lines.json index 189ecacb71c..82e03e27a83 100644 --- a/scripts/vale/test/changed_lines.json +++ b/scripts/vale/test/changed_lines.json @@ -6,4 +6,4 @@ 29 ] } -] \ No newline at end of file +] From 63a488c7f51009caceb01ee7376f2300eaf54fcb Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:40:24 +0200 Subject: [PATCH 35/40] newline end of file --- scripts/vale/test/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vale/test/test.py b/scripts/vale/test/test.py index 7e49d0e5eb4..7060e27f7da 100644 --- a/scripts/vale/test/test.py +++ b/scripts/vale/test/test.py @@ -50,4 +50,4 @@ def main(): print(f"Return code: {result.returncode}") if __name__ == "__main__": - main() \ No newline at end of file + main() From bc6b26f1a713757dac597fb57ca51801a1268835 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:44:41 +0200 Subject: [PATCH 36/40] Fix vale suggestions --- docs/best-practices/json_type.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/best-practices/json_type.md b/docs/best-practices/json_type.md index a570fb5f2de..aadde48ca97 100644 --- a/docs/best-practices/json_type.md +++ b/docs/best-practices/json_type.md @@ -8,7 +8,7 @@ description: 'Page describing when to use JSON' ClickHouse now offers a native JSON column type designed for semi-structured and dynamic data. It's important to clarify that **this is a column type, not a data format**—you can insert JSON into ClickHouse as a string or via supported formats like [JSONEachRow](/docs/interfaces/formats/JSONEachRow), but that does not imply using the JSON column type. Users should only use the JSON type when the structure of their data is dynamic, not when they simply happen to store JSON. -## When To Use the JSON type {#when-to-use-the-json-type} +## When To use the JSON type {#when-to-use-the-json-type} Use the JSON type when your data: @@ -24,9 +24,9 @@ If your data structure is known and consistent, there is rarely a need for the J You can also mix approaches - for example, use static columns for predictable top-level fields and a single JSON column for a dynamic section of the payload. -## Considerations And Tips for using json {#considerations-and-tips-for-using-json} +## Considerations And tips for using json {#considerations-and-tips-for-using-json} -The JSON type uses British spelling of colour enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: +The JSON type enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: * **Specify path types** using [hints in the column definition](/sql-reference/data-types/newjson) to specify types for known sub columns, avoiding unnecessary type inference. * **Skip paths** if you don't need the values, with [SKIP and SKIP REGEXP](/sql-reference/data-types/newjson) to reduce storage and improve performance. From 6a9df554c729ccdf862feecd36f38fb75eeff3a0 Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:47:17 +0200 Subject: [PATCH 37/40] newline end of file --- scripts/vale/changed_lines_to_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vale/changed_lines_to_json.py b/scripts/vale/changed_lines_to_json.py index 8dbfa804896..f9079621524 100644 --- a/scripts/vale/changed_lines_to_json.py +++ b/scripts/vale/changed_lines_to_json.py @@ -101,4 +101,4 @@ def main(): print(f.read()) if __name__ == "__main__": - main() \ No newline at end of file + main() From 05c290261b4c82797764eacbb4e248e7b7b6917a Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:47:44 +0200 Subject: [PATCH 38/40] Update vale_output.log --- scripts/vale/test/vale_output.log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vale/test/vale_output.log b/scripts/vale/test/vale_output.log index 82191f68eac..f49a01aeb5a 100644 --- a/scripts/vale/test/vale_output.log +++ b/scripts/vale/test/vale_output.log @@ -3,4 +3,4 @@ docs/best-practices/json_type.md:11:4:warning:ClickHouse.Headings:'When To Use t docs/best-practices/json_type.md:39:4:warning:ClickHouse.Headings:'Advanced Features {#advanced-features}' should use sentence-style capitalization. docs/best-practices/json_type.md:41:79:suggestion:ClickHouse.Contractions:Use 'can't' instead of 'cannot'. docs/best-practices/json_type.md:125:57:suggestion:ClickHouse.Contractions:Use 'it's' instead of 'it is'. -docs/best-practices/json_type.md:125:110:suggestion:ClickHouse.Contractions:Use 'won't' instead of 'will not'. \ No newline at end of file +docs/best-practices/json_type.md:125:110:suggestion:ClickHouse.Contractions:Use 'won't' instead of 'will not'. From 18078ab585d4740a0284c0cf5e2730259162340e Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:49:00 +0200 Subject: [PATCH 39/40] Restore test changes --- docs/best-practices/json_type.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/best-practices/json_type.md b/docs/best-practices/json_type.md index aadde48ca97..2eec875ad9c 100644 --- a/docs/best-practices/json_type.md +++ b/docs/best-practices/json_type.md @@ -8,7 +8,7 @@ description: 'Page describing when to use JSON' ClickHouse now offers a native JSON column type designed for semi-structured and dynamic data. It's important to clarify that **this is a column type, not a data format**—you can insert JSON into ClickHouse as a string or via supported formats like [JSONEachRow](/docs/interfaces/formats/JSONEachRow), but that does not imply using the JSON column type. Users should only use the JSON type when the structure of their data is dynamic, not when they simply happen to store JSON. -## When To use the JSON type {#when-to-use-the-json-type} +## When to use the JSON type {#when-to-use-the-json-type} Use the JSON type when your data: @@ -24,7 +24,7 @@ If your data structure is known and consistent, there is rarely a need for the J You can also mix approaches - for example, use static columns for predictable top-level fields and a single JSON column for a dynamic section of the payload. -## Considerations And tips for using json {#considerations-and-tips-for-using-json} +## Considerations and tips for using json {#considerations-and-tips-for-using-json} The JSON type enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: @@ -36,7 +36,7 @@ The JSON type enables efficient columnar storage by flattening paths into subcol Type hits offer more than just a way to avoid unnecessary type inference - they eliminate storage and processing indirection entirely. JSON paths with type hints are always stored just like traditional columns, bypassing the need for [**discriminator columns**](https://clickhouse.com/blog/a-new-powerful-json-data-type-for-clickhouse#storage-extension-for-dynamically-changing-data) or dynamic resolution during query time. This means that with well-defined type hints, nested JSON fields achieve the same performance and efficiency as if they were modeled as top-level fields from the outset. As a result, for datasets that are mostly consistent but still benefit from the flexibility of JSON, type hints provide a convenient way to preserve performance without needing to restructure your schema or ingest pipeline. ::: -## Advanced Features {#advanced-features} +## Advanced features {#advanced-features} * JSON columns **can be used in primary keys** like any other columns. Codecs cannot be specified for a sub-column. * They support introspection via functions like [`JSONAllPathsWithTypes()` and `JSONDynamicPaths()`](/sql-reference/data-types/newjson#introspection-functions). From 61afa35438d8a7e690b9c24eef36607521f5dd2a Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Fri, 25 Apr 2025 12:49:26 +0200 Subject: [PATCH 40/40] Update json_type.md --- docs/best-practices/json_type.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/best-practices/json_type.md b/docs/best-practices/json_type.md index 2eec875ad9c..22d3b28f6d5 100644 --- a/docs/best-practices/json_type.md +++ b/docs/best-practices/json_type.md @@ -24,7 +24,7 @@ If your data structure is known and consistent, there is rarely a need for the J You can also mix approaches - for example, use static columns for predictable top-level fields and a single JSON column for a dynamic section of the payload. -## Considerations and tips for using json {#considerations-and-tips-for-using-json} +## Considerations and tips for using JSON {#considerations-and-tips-for-using-json} The JSON type enables efficient columnar storage by flattening paths into subcolumns. But with flexibility comes responsibility. To use it effectively: