Skip to content

Big update (ClickHouse) - #150

Open
RAprogramm wants to merge 34 commits into
mainfrom
big-update
Open

RAprogramm wants to merge 34 commits into
mainfrom
big-update

Conversation

@RAprogramm

Copy link
Copy Markdown
Owner

No description provided.

- Add Copy to Provider/Dialect/Format; pass small enums by value
- needless_pass_by_value: file_read_error/http_error take refs; RuleRunner
  constructors take &RulesConfig; parse_select_query takes &Query
- Replace format!-push_str with write!/writeln! in output/schema/yaml
- Group ClickHouse query flags into ClickHouseFlags; rename Query.query_type
  to kind (struct_field_names, struct_excessive_bools)
- Integer backoff (backoff_factor: u32) to drop float casts; usize->u32 via
  try_from; split to_summary/format_text_summary (too_many_lines)
- Merge identical match arms; option_if_let_else; or_else; assigning_clones;
  unused_self; missing_errors_doc; doc_markdown; must_use; const fn
- Update tests and doctests accordingly
@RAprogramm RAprogramm self-assigned this Nov 25, 2026
# Conflicts:
#	Cargo.lock
#	src/query/extract/expr.rs
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Rust Diff Analysis

Caution

PR exceeds configured limits. Consider splitting into smaller PRs.

  • 244 units (limit: 30)
  • 440 weighted score (limit: 100)
  • 2093 lines added (limit: 200)
Limits — configured thresholds for this repository

Each metric is compared against its configured maximum. If any limit is exceeded, the PR check fails.

Metric Value Limit Status
Production Units 244 30 ❌
Weighted Score 440 100 ❌
Lines Added 2093 200 ❌

Understanding the metrics:

  • Production Units: Functions, structs, enums, traits, and other semantic code units in production code
  • Weighted Score: Complexity score based on unit types (public APIs weigh more than private)
  • Lines Added: Raw count of new lines in production code
Summary — breakdown of changes by category

Production code counts toward limits. Test code is tracked but doesn't affect limits.

Metric Production Test
Functions 165 -
Structs/Enums 39 -
Other 40 -
Lines added +2093 +1266
Lines removed -399 -136
Total units 244 203
Production Changes — 244 units modified

Semantic units (functions, structs, etc.) that were added or modified in production code.

File Unit Type Changes
src/app/analyze.rs:28-153 run_analyze function +12 -6
src/app/convert.rs:13-43 convert_dialect function +2 -1
src/app/convert.rs:45-74 convert_format function +2 -1
src/app/helpers.rs:24-64 calculate_exit_code function +7 -7
src/app/helpers.rs:66-92 read_queries_input function +2 -2
src/app/helpers.rs:122-147 create_output_options function +6 -1
src/app/helpers.rs:149-201 build_llm_provider function +5 -3
src/app/helpers.rs:203-210 env_base_url function +8 -0
src/app/helpers.rs:212-229 has_llm_access function +2 -1
src/app/helpers.rs:231-256 get_effective_model function +2 -1
src/app/helpers.rs:258-278 get_effective_ollama_url function +1 -0
src/app/types.rs:9-61 AnalyzeParams struct +1 -1
src/cache.rs:50-56 QueryCache::new function +1 -0
src/cache.rs:64-68 QueryCache::get function +1 -0
src/cli.rs:14-62 Commands enum +1 -1
src/cli.rs:64-69 Provider enum +1 -1
src/cli.rs:72-80 Provider::default_model function +2 -1
src/cli.rs:83-91 Dialect enum +1 -1
src/cli.rs:93-99 Format enum +1 -1
src/config.rs:61-70 RulesConfig struct +1 -1
src/config.rs:92-99 RetryConfig struct +1 -1
src/config.rs:102-109 Default for RetryConfig::default function +1 -1
src/config.rs:113-159 Config::load function +9 -4
src/error.rs:15-24 file_read_error function +3 -2
src/error.rs:43-56 http_error function +4 -3
src/error.rs:63-82 format_sql_error function +12 -11
src/llm.rs:63-66 GENERIC_PROMPT const +4 -0
src/llm.rs:68-74 CLICKHOUSE_PROMPT const +7 -0
src/llm.rs:76-77 OPENAI_BASE_URL const +2 -0
src/llm.rs:79-80 ANTHROPIC_BASE_URL const +2 -0
src/llm.rs:82-110 LlmProvider enum +10 -6
src/llm.rs:184-197 join_endpoint function +14 -0
src/llm.rs:199-215 build_prompt function +17 -0
src/llm.rs:218-223 LlmClient::new function +1 -0
src/llm.rs:225-237 LlmClient::with_retry_config function +1 -0
src/llm.rs:239-253 LlmClient::analyze function +12 -14
src/llm.rs:255-283 LlmClient::call_with_retry function +3 -2
src/llm.rs:285-295 LlmClient::is_retryable_error function +1 -1
src/llm.rs:297-320 LlmClient::call_provider function +12 -4
src/llm.rs:322-356 LlmClient::call_openai function +13 -9
src/llm.rs:358-396 LlmClient::call_anthropic function +12 -6
src/llm.rs:398-419 LlmClient::call_ollama function +3 -6
src/main.rs:182-186 print_output function +1 -1
src/output.rs:6-6 yaml module +1 -0
src/output.rs:48-57 format_queries_summary function +1 -1
src/output.rs:59-87 format_analysis_result function +1 -1
src/output.rs:89-179 format_text_summary function +48 -41
src/output.rs:181-206 write_complexity function +26 -1
src/output.rs:207-215 format_static_analysis function +2 -1
src/output.rs:262-338 format_text_analysis function +5 -4
src/output/yaml.rs:13-31 to_string function +19 -0
src/output/yaml.rs:33-51 emit_scalar function +19 -0
src/output/yaml.rs:53-76 emit_array function +24 -0
src/output/yaml.rs:78-109 emit_object function +32 -0
src/output/yaml.rs:111-116 push_indent function +6 -0
src/output/yaml.rs:118-125 format_key function +8 -0
src/output/yaml.rs:127-134 format_scalar function +8 -0
src/output/yaml.rs:136-159 is_plain_safe function +24 -0
src/output/yaml.rs:161-164 looks_numeric function +4 -0
src/output/yaml.rs:166-185 quote function +20 -0
src/preprocessor.rs:43-64 PreprocessorMetadata struct +17 -7
src/preprocessor.rs:76-82 Preprocessor::new function +1 -1
src/preprocessor/clickhouse.rs:33-47 SkipIndexInfo struct +15 -0
src/preprocessor/clickhouse.rs:49-56 ProjectionInfo struct +8 -0
src/preprocessor/clickhouse.rs:58-67 MaterializedViewInfo struct +10 -0
src/preprocessor/clickhouse.rs:82-85 TTL_REGEX static +1 -1
src/preprocessor/clickhouse.rs:92-95 PARTITION_BY_REGEX static +1 -1
src/preprocessor/clickhouse.rs:97-100 SAMPLE_BY_REGEX static +4 -0
src/preprocessor/clickhouse.rs:106-113 SKIP_INDEX_REGEX static +8 -1
src/preprocessor/clickhouse.rs:115-120 SKIP_INDEX_REMOVE_REGEX static +6 -0
src/preprocessor/clickhouse.rs:122-129 DICTIONARY_REGEX static +8 -0
src/preprocessor/clickhouse.rs:131-134 DICTIONARY_REMOVE_REGEX static +4 -0
src/preprocessor/clickhouse.rs:136-143 MATERIALIZED_VIEW_REGEX static +8 -0
src/preprocessor/clickhouse.rs:145-151 MATERIALIZED_VIEW_ENGINE_REGEX static +7 -0
src/preprocessor/clickhouse.rs:153-157 MUTATION_UPDATE_REGEX static +5 -0
src/preprocessor/clickhouse.rs:159-163 MUTATION_DELETE_REGEX static +5 -0
src/preprocessor/clickhouse.rs:165-176 rewrite_mutations function +12 -0
src/preprocessor/clickhouse.rs:178-207 preprocess function +17 -6
src/preprocessor/clickhouse.rs:257-264 extract_sample_by function +8 -0
src/preprocessor/clickhouse.rs:266-269 remove_sample_by function +4 -0
src/preprocessor/clickhouse.rs:271-292 extract_skip_indexes function +22 -0
src/preprocessor/clickhouse.rs:294-297 remove_skip_indexes function +4 -0
src/preprocessor/clickhouse.rs:299-365 find_projections function +67 -0
src/preprocessor/clickhouse.rs:367-394 matching_paren function +28 -0
src/preprocessor/clickhouse.rs:396-420 projection_as_end function +25 -0
src/preprocessor/clickhouse.rs:422-427 extract_projections function +6 -0
src/preprocessor/clickhouse.rs:429-449 remove_projections function +21 -0
src/preprocessor/clickhouse.rs:451-458 extract_dictionaries function +8 -0
src/preprocessor/clickhouse.rs:460-463 remove_dictionaries function +4 -0
src/preprocessor/clickhouse.rs:465-485 extract_materialized_views function +21 -0
src/preprocessor/clickhouse.rs:487-495 remove_materialized_view_engine function +9 -0
src/preprocessor/clickhouse.rs:497-500 remove_codecs function +1 -1
src/preprocessor/clickhouse.rs:502-505 remove_ttl function +1 -1
src/preprocessor/clickhouse.rs:507-510 remove_settings function +1 -1
src/preprocessor/clickhouse.rs:512-515 remove_partition_by function +1 -1
src/preprocessor/clickhouse.rs:517-519 WHITESPACE_REGEX static +3 -0
src/preprocessor/clickhouse.rs:521-524 normalize_whitespace function +2 -2
src/preprocessor/clickhouse.rs:526-537 find_keyword_ignore_case function +11 -0
src/query.rs:18-28 SqlDialect enum +1 -1
src/query.rs:31-41 SqlDialect::into_parser_dialect function +1 -0
src/query.rs:44-70 parse_queries function +18 -3
src/query.rs:72-128 parse_statement function +9 -9
src/query.rs:130-211 parse_select_query function +3 -2
src/query.rs:213-228 enrich_clickhouse_query function +15 -0
src/query/extract/expr.rs:6-95 extract_columns_from_expr function +13 -29
src/query/extract/expr.rs:171-210 contains_subquery function +13 -10
src/query/extract/set_expr.rs:9-94 extract_from_set_expr function +6 -0
src/query/extract/table.rs:6-56 extract_from_table_factor function +0 -3
src/query/types.rs:10-32 Query struct +19 -16
src/query/types.rs:34-46 ClickHouseFlags struct +12 -0
src/query/types.rs:90-111 Default for Query::default function +3 -1
src/query/types.rs:115-122 Query::new function +3 -2
src/query/types.rs:139-166 calculate_complexity function +9 -7
src/rules.rs:69-69 clickhouse module +1 -0
src/rules.rs:144-173 RuleRunner struct +1 -1
src/rules.rs:181-379 RuleRunner impl +1 -0
src/rules.rs:182-186 RuleRunner::new function +2 -1
src/rules.rs:188-198 RuleRunner::with_config function +4 -2
src/rules.rs:200-276 RuleRunner::with_dialect_and_config function +23 -0
src/rules.rs:278-351 RuleRunner::with_schema_and_config_and_dialect function +54 -14
src/rules/clickhouse.rs:14-22 find_table function +9 -0
src/rules/clickhouse.rs:24-41 identifiers_in function +18 -0
src/rules/clickhouse.rs:43-51 sort_key function +9 -0
src/rules/clickhouse.rs:53-54 SelectStarWideTable struct +2 -0
src/rules/clickhouse.rs:56-88 Rule for SelectStarWideTable impl +3 -0
src/rules/clickhouse.rs:57-64 Rule for SelectStarWideTable::info function +8 -0
src/rules/clickhouse.rs:66-87 Rule for SelectStarWideTable::check function +22 -0
src/rules/clickhouse.rs:90-93 FilterNotUsingPrimaryKey struct +4 -0
src/rules/clickhouse.rs:95-144 Rule for FilterNotUsingPrimaryKey impl +3 -0
src/rules/clickhouse.rs:96-103 Rule for FilterNotUsingPrimaryKey::info function +8 -0
src/rules/clickhouse.rs:105-143 Rule for FilterNotUsingPrimaryKey::check function +39 -0
src/rules/clickhouse.rs:146-149 PartitionPruningMissed struct +4 -0
src/rules/clickhouse.rs:151-199 Rule for PartitionPruningMissed impl +3 -0
src/rules/clickhouse.rs:152-159 Rule for PartitionPruningMissed::info function +8 -0
src/rules/clickhouse.rs:161-198 Rule for PartitionPruningMissed::check function +38 -0
src/rules/clickhouse.rs:201-202 FunctionOnKeyColumn struct +2 -0
src/rules/clickhouse.rs:204-216 CH_DATE_FUNCTIONS const +13 -0
src/rules/clickhouse.rs:218-254 Rule for FunctionOnKeyColumn impl +3 -0
src/rules/clickhouse.rs:219-226 Rule for FunctionOnKeyColumn::info function +8 -0
src/rules/clickhouse.rs:228-253 Rule for FunctionOnKeyColumn::check function +26 -0
src/rules/clickhouse.rs:256-259 MissingSkipIndex struct +4 -0
src/rules/clickhouse.rs:261-309 Rule for MissingSkipIndex impl +3 -0
src/rules/clickhouse.rs:262-269 Rule for MissingSkipIndex::info function +8 -0
src/rules/clickhouse.rs:271-308 Rule for MissingSkipIndex::check function +38 -0
src/rules/clickhouse.rs:311-314 LowCardinalityHighCardinality struct +4 -0
src/rules/clickhouse.rs:316-316 HIGH_CARDINALITY_HINTS const +1 -0
src/rules/clickhouse.rs:318-365 Rule for LowCardinalityHighCardinality impl +3 -0
src/rules/clickhouse.rs:319-326 Rule for LowCardinalityHighCardinality::info function +8 -0
src/rules/clickhouse.rs:328-364 Rule for LowCardinalityHighCardinality::check function +37 -0
src/rules/clickhouse.rs:367-370 NullableHotPath struct +4 -0
src/rules/clickhouse.rs:372-422 Rule for NullableHotPath impl +3 -0
src/rules/clickhouse.rs:373-380 Rule for NullableHotPath::info function +8 -0
src/rules/clickhouse.rs:382-421 Rule for NullableHotPath::check function +40 -0
src/rules/clickhouse.rs:424-425 UniqExactUsage struct +2 -0
src/rules/clickhouse.rs:427-455 Rule for UniqExactUsage impl +3 -0
src/rules/clickhouse.rs:428-435 Rule for UniqExactUsage::info function +8 -0
src/rules/clickhouse.rs:437-454 Rule for UniqExactUsage::check function +18 -0
src/rules/clickhouse.rs:457-458 CountIfOpportunity struct +2 -0
src/rules/clickhouse.rs:460-490 Rule for CountIfOpportunity impl +3 -0
src/rules/clickhouse.rs:461-468 Rule for CountIfOpportunity::info function +8 -0
src/rules/clickhouse.rs:470-489 Rule for CountIfOpportunity::check function +20 -0
src/rules/clickhouse.rs:492-493 OrderByInSubquery struct +2 -0
src/rules/clickhouse.rs:495-527 Rule for OrderByInSubquery impl +3 -0
src/rules/clickhouse.rs:496-503 Rule for OrderByInSubquery::info function +8 -0
src/rules/clickhouse.rs:505-526 Rule for OrderByInSubquery::check function +22 -0
src/rules/clickhouse.rs:529-532 GroupByOrderMismatch struct +4 -0
src/rules/clickhouse.rs:534-585 Rule for GroupByOrderMismatch impl +3 -0
src/rules/clickhouse.rs:535-542 Rule for GroupByOrderMismatch::info function +8 -0
src/rules/clickhouse.rs:544-584 Rule for GroupByOrderMismatch::check function +41 -0
src/rules/clickhouse.rs:587-588 JoinBigTables struct +2 -0
src/rules/clickhouse.rs:590-624 Rule for JoinBigTables impl +3 -0
src/rules/clickhouse.rs:591-598 Rule for JoinBigTables::info function +8 -0
src/rules/clickhouse.rs:600-623 Rule for JoinBigTables::check function +24 -0
src/rules/clickhouse.rs:626-627 FinalUsage struct +2 -0
src/rules/clickhouse.rs:629-658 Rule for FinalUsage impl +3 -0
src/rules/clickhouse.rs:630-637 Rule for FinalUsage::info function +8 -0
src/rules/clickhouse.rs:639-657 Rule for FinalUsage::check function +19 -0
src/rules/clickhouse.rs:660-661 PrewhereOpportunity struct +2 -0
src/rules/clickhouse.rs:663-695 Rule for PrewhereOpportunity impl +3 -0
src/rules/clickhouse.rs:664-671 Rule for PrewhereOpportunity::info function +8 -0
src/rules/clickhouse.rs:673-694 Rule for PrewhereOpportunity::check function +22 -0
src/rules/clickhouse.rs:697-698 HeavyMutation struct +2 -0
src/rules/clickhouse.rs:700-729 Rule for HeavyMutation impl +3 -0
src/rules/clickhouse.rs:701-708 Rule for HeavyMutation::info function +8 -0
src/rules/clickhouse.rs:710-728 Rule for HeavyMutation::check function +19 -0
src/rules/clickhouse.rs:731-732 ManualOptimizeFinal struct +2 -0
src/rules/clickhouse.rs:734-764 Rule for ManualOptimizeFinal impl +3 -0
src/rules/clickhouse.rs:735-742 Rule for ManualOptimizeFinal::info function +8 -0
src/rules/clickhouse.rs:744-763 Rule for ManualOptimizeFinal::check function +20 -0
src/rules/clickhouse.rs:766-769 DictionaryLookupOpportunity struct +4 -0
src/rules/clickhouse.rs:771-813 Rule for DictionaryLookupOpportunity impl +3 -0
src/rules/clickhouse.rs:772-779 Rule for DictionaryLookupOpportunity::info function +8 -0
src/rules/clickhouse.rs:781-812 Rule for DictionaryLookupOpportunity::check function +32 -0
src/rules/clickhouse.rs:815-818 GroupByStringKey struct +4 -0
src/rules/clickhouse.rs:820-869 Rule for GroupByStringKey impl +3 -0
src/rules/clickhouse.rs:821-828 Rule for GroupByStringKey::info function +8 -0
src/rules/clickhouse.rs:830-868 Rule for GroupByStringKey::check function +39 -0
src/rules/performance.rs:17-41 Rule for ScalarSubquery::check function +1 -1
src/rules/performance.rs:171-188 Rule for SelectWithoutWhere::check function +1 -1
src/rules/performance.rs:204-223 Rule for SelectStarWithoutLimit::check function +1 -1
src/rules/performance.rs:270-288 Rule for OrInsteadOfIn::check function +1 -4
src/rules/performance.rs:304-320 Rule for LargeOffset::check function +1 -4
src/rules/performance.rs:336-359 Rule for MissingJoinCondition::check function +2 -3
src/rules/performance.rs:362-368 OrderByRandom struct +1 -1
src/rules/performance.rs:380-407 Rule for OrderByRandom::check function +1 -1
src/rules/performance.rs:427-451 Rule for CountWithoutWhere::check function +1 -1
src/rules/performance.rs:509-535 Rule for LargeInClause::check function +1 -1
src/rules/performance.rs:568-599 Rule for HavingWithoutAggregate::check function +1 -1
src/rules/performance.rs:620-654 Rule for UnnecessaryDistinct::check function +1 -1
src/rules/performance.rs:702-731 Rule for DeeplyNestedSubqueries::check function +2 -2
src/rules/performance.rs:771-795 Rule for RepeatedTableScan::check function +2 -2
src/rules/performance.rs:920-943 Rule for CorrelatedSubquery::check function +1 -1
src/rules/schema_aware.rs:13-18 MissingIndexOnFilterColumn::new function +2 -1
src/rules/schema_aware.rs:39-76 Rule for MissingIndexOnFilterColumn::check function +5 -5
src/rules/schema_aware.rs:85-90 ColumnNotInSchema::new function +2 -1
src/rules/schema_aware.rs:111-141 Rule for ColumnNotInSchema::check function +2 -2
src/rules/schema_aware.rs:156-161 JoinOnNonIndexedColumn::new function +2 -1
src/rules/schema_aware.rs:174-226 Rule for JoinOnNonIndexedColumn::check function +1 -1
src/rules/schema_aware.rs:239-244 ImplicitTypeConversion::new function +2 -1
src/rules/schema_aware.rs:291-322 Rule for ImplicitTypeConversion::check function +1 -2
src/rules/schema_aware.rs:331-336 SuggestIndex::new function +2 -1
src/rules/schema_aware.rs:349-379 Rule for SuggestIndex::check function +2 -2
src/rules/security.rs:23-43 Rule for TruncateDetected::check function +2 -3
src/rules/security.rs:59-76 Rule for MissingWhereInUpdate::check function +1 -1
src/rules/security.rs:97-118 Rule for DropDetected::check function +3 -7
src/rules/security.rs:226-233 HardcodedCredential struct +1 -1
src/rules/security.rs:286-301 has_sensitive_insert function +1 -1
src/rules/security.rs:422-439 Rule for MissingWhereInDelete::check function +1 -1
src/rules/style.rs:17-38 Rule for SelectStar::check function +1 -1
src/rules/style.rs:104-132 Rule for OrdinalInOrderOrGroupBy::check function +1 -1
src/rules/style.rs:148-172 Rule for MissingTableAlias::check function +1 -1
src/rules/types.rs:107-114 AnalysisReport::new function +2 -1
src/rules/types.rs:120-126 AnalysisReport::error_count function +1 -0
src/rules/types.rs:128-134 AnalysisReport::warning_count function +1 -0
src/rules/types.rs:136-142 AnalysisReport::info_count function +1 -0
src/schema.rs:46-75 TableInfo struct +15 -5
src/schema.rs:77-90 ColumnInfo struct +1 -1
src/schema.rs:103-114 Schema struct +5 -1
src/schema.rs:116-391 Schema impl +1 -0
src/schema.rs:117-148 Schema::parse function +7 -1
src/schema.rs:150-246 Schema::process_statement function +41 -12
src/schema.rs:267-277 Schema::extract_exprs function +3 -1
src/schema.rs:279-302 Schema::to_summary function +19 -14
src/schema.rs:304-390 Schema::write_table_summary function +82 -30
Test Changes — 203 units modified

Test code changes don't count toward PR size limits.

File Unit Type Changes
benches/analyzer.rs:58-70 queries_sql function +11 -7
benches/analyzer.rs:72-85 schema_sql function +3 -2
benches/analyzer.rs:87-99 clickhouse_schema_sql function +11 -10
benches/analyzer.rs:109-116 report function +5 -1
benches/analyzer.rs:118-124 output_options function +1 -1
benches/analyzer.rs:164-173 analyze_rules_with_schema function +5 -1
benches/analyzer.rs:175-185 build_rule_runner_with_schema function +5 -1
benches/analyzer.rs:199-216 full_static_pipeline function +5 -1
src/app.rs:233-256 test_execute_command_success function +1 -1
src/app.rs:329-352 test_execute_command_json_format function +1 -1
src/app.rs:354-376 test_execute_command_verbose function +1 -1
src/app.rs:378-400 test_execute_command_yaml_format function +1 -1
src/app/helpers.rs:360-363 test_has_llm_access_with_api_key function +1 -1
src/app/helpers.rs:365-368 test_has_llm_access_ollama_no_key function +1 -1
src/app/helpers.rs:370-373 test_has_llm_access_openai_no_key function +1 -1
src/app/helpers.rs:375-378 test_has_llm_access_anthropic_no_key function +1 -1
src/app/helpers.rs:380-384 test_get_effective_model_explicit function +1 -1
src/app/helpers.rs:386-390 test_get_effective_model_from_config function +1 -1
src/app/helpers.rs:392-396 test_get_effective_model_default function +1 -1
src/app/types.rs:125-141 test_analyze_params_debug function +1 -1
src/app/types.rs:162-171 test_analyze_result_debug function +1 -1
src/app/types.rs:173-180 test_dry_run_info_debug function +1 -1
src/app/types.rs:182-189 test_command_output_debug function +1 -1
src/app/types.rs:191-200 test_command_output_clone function +1 -1
src/llm.rs:422-770 tests module +30 -0
src/llm.rs:431-438 no_retry function +8 -0
src/llm.rs:440-457 mock_server function +18 -0
src/llm.rs:459-465 build_prompt_clickhouse_has_columnar_guidance function +7 -0
src/llm.rs:467-472 build_prompt_generic_uses_oltp_guidance function +6 -0
src/llm.rs:474-486 retryable_error_detection function +13 -0
src/llm.rs:488-498 response_structs_parse function +11 -0
src/llm.rs:500-515 ollama_success_returns_text function +16 -0
src/llm.rs:517-532 ollama_error_status_is_returned function +16 -0
src/llm.rs:534-544 connection_failure_is_reported function +11 -0
src/llm.rs:546-568 join_endpoint_handles_both_base_url_conventions function +23 -0
src/llm.rs:570-587 openai_success_via_base_url_override function +18 -0
src/llm.rs:589-605 openai_error_status_is_returned function +17 -0
src/llm.rs:607-620 anthropic_success_via_base_url_override function +14 -0
src/llm.rs:622-638 anthropic_error_status_is_returned function +17 -0
src/llm.rs:640-647 new_uses_default_retry_config function +8 -0
src/llm.rs:649-669 openai_success_returns_message_content function +21 -0
src/llm.rs:671-687 openai_empty_choices_is_error function +17 -0
src/llm.rs:689-705 anthropic_success_returns_text function +17 -0
src/llm.rs:707-723 anthropic_empty_content_is_error function +17 -0
src/llm.rs:725-746 mock_server_seq function +22 -0
src/llm.rs:748-769 retry_recovers_after_transient_server_error function +22 -0
src/output/yaml.rs:187-276 tests module +16 -0
src/output/yaml.rs:191-193 yaml function +3 -0
src/output/yaml.rs:195-202 scalar_map function +8 -0
src/output/yaml.rs:204-215 nested_object_and_array function +12 -0
src/output/yaml.rs:217-223 empty_containers function +7 -0
src/output/yaml.rs:225-233 quotes_ambiguous_strings function +9 -0
src/output/yaml.rs:235-239 escapes_newlines function +5 -0
src/output/yaml.rs:241-245 array_of_scalars function +5 -0
src/output/yaml.rs:247-251 top_level_array_of_objects function +5 -0
src/output/yaml.rs:253-257 nested_array_in_array function +5 -0
src/output/yaml.rs:259-264 quotes_special_keys function +6 -0
src/output/yaml.rs:266-270 escapes_control_characters function +5 -0
src/output/yaml.rs:272-275 top_level_scalar function +4 -0
src/preprocessor/clickhouse.rs:539-725 tests module +7 -0
src/preprocessor/clickhouse.rs:558-576 test_multiple_codecs function +2 -2
src/preprocessor/clickhouse.rs:609-636 test_complex_clickhouse_ddl function +3 -2
src/preprocessor/clickhouse.rs:638-649 test_ttl_followed_by_settings_keeps_no_body function +12 -0
src/preprocessor/clickhouse.rs:651-659 test_sample_by_followed_by_settings function +9 -0
src/preprocessor/clickhouse.rs:661-670 test_projection_extraction function +10 -0
src/preprocessor/clickhouse.rs:672-679 test_projection_as_select_form function +8 -0
src/preprocessor/clickhouse.rs:681-689 test_dictionary_removal function +9 -0
src/preprocessor/clickhouse.rs:691-703 test_materialized_view_engine_strip function +13 -0
src/preprocessor/clickhouse.rs:705-711 test_rewrite_mutations function +7 -0
src/preprocessor/clickhouse.rs:713-724 test_no_modification_without_special_syntax function +4 -1
tests/app_analyze_tests.rs:12-27 mock_ollama_server function +16 -0
tests/app_analyze_tests.rs:29-53 run_analyze_with_llm_appends_analysis function +25 -0
tests/app_analyze_tests.rs:55-76 run_analyze_llm_failure_propagates_error function +22 -0
tests/cache_tests.rs:61-72 test_cache_different_queries function +2 -2
tests/cli_tests.rs:24-33 test_dialect_variants function +7 -4
tests/cli_tests.rs:35-39 test_format_variants function +2 -4
tests/cli_tests.rs:41-46 test_provider_clone function +1 -1
tests/cli_tests.rs:48-53 test_dialect_clone function +2 -1
tests/cli_tests.rs:55-60 test_format_clone function +2 -1
tests/cli_tests.rs:62-67 test_provider_debug function +1 -1
tests/cli_tests.rs:69-74 test_dialect_debug function +1 -1
tests/cli_tests.rs:76-81 test_format_debug function +1 -1
tests/clickhouse_tests.rs:11-25 ch_ids function +15 -0
tests/clickhouse_tests.rs:27-27 MERGE_TREE const +1 -0
tests/clickhouse_tests.rs:29-33 ch001_flags_select_star function +5 -0
tests/clickhouse_tests.rs:35-39 ch001_ignores_explicit_columns function +5 -0
tests/clickhouse_tests.rs:41-45 ch002_flags_filter_off_sort_key function +5 -0
tests/clickhouse_tests.rs:47-51 ch002_ok_when_filter_uses_sort_key function +5 -0
tests/clickhouse_tests.rs:53-59 ch003_flags_missing_partition_pruning function +7 -0
tests/clickhouse_tests.rs:61-67 ch003_ok_when_partition_pruned function +7 -0
tests/clickhouse_tests.rs:69-73 ch004_flags_function_on_date_column function +5 -0
tests/clickhouse_tests.rs:75-82 ch004_ok_for_range_predicate function +8 -0
tests/clickhouse_tests.rs:84-88 ch005_flags_uncovered_filter_column function +5 -0
tests/clickhouse_tests.rs:90-95 ch005_ok_when_skip_index_present function +6 -0
tests/clickhouse_tests.rs:97-102 ch006_flags_lowcardinality_high_cardinality function +6 -0
tests/clickhouse_tests.rs:104-109 ch007_flags_nullable_in_filter function +6 -0
tests/clickhouse_tests.rs:111-115 ch009_flags_uniqexact function +5 -0
tests/clickhouse_tests.rs:117-121 ch009_ok_for_approximate_uniq function +5 -0
tests/clickhouse_tests.rs:123-128 ch010_flags_multiple_count_subqueries function +6 -0
tests/clickhouse_tests.rs:130-135 ch011_flags_order_by_in_subquery_without_limit function +6 -0
tests/clickhouse_tests.rs:137-141 ch012_flags_group_by_mismatch function +5 -0
tests/clickhouse_tests.rs:143-147 ch012_ok_when_group_by_matches_key function +5 -0
tests/clickhouse_tests.rs:149-155 ch016_flags_multi_table_join function +7 -0
tests/clickhouse_tests.rs:157-161 ch019_flags_final function +5 -0
tests/clickhouse_tests.rs:163-167 ch019_ok_without_final function +5 -0
tests/clickhouse_tests.rs:169-185 generic_dialect_does_not_run_clickhouse_rules function +17 -0
tests/clickhouse_tests.rs:187-191 ch021_flags_where_without_prewhere function +5 -0
tests/clickhouse_tests.rs:193-197 ch021_ok_when_prewhere_present function +5 -0
tests/clickhouse_tests.rs:199-203 ch022_flags_alter_update function +5 -0
tests/clickhouse_tests.rs:205-209 ch022_ignores_alter_add_column function +5 -0
tests/clickhouse_tests.rs:211-215 ch023_flags_optimize_final function +5 -0
tests/clickhouse_tests.rs:217-224 ch024_flags_join_with_dictionary function +8 -0
tests/clickhouse_tests.rs:226-231 ch025_flags_group_by_plain_string function +6 -0
tests/clickhouse_tests.rs:233-238 ch025_ok_for_low_cardinality function +6 -0
tests/clickhouse_tests.rs:240-242 ch_preprocess function +3 -0
tests/clickhouse_tests.rs:244-248 test_projection_without_name_is_ignored function +5 -0
tests/clickhouse_tests.rs:250-254 test_projection_at_end_of_input_is_ignored function +5 -0
tests/clickhouse_tests.rs:256-260 test_projection_unclosed_paren_is_ignored function +5 -0
tests/clickhouse_tests.rs:262-266 test_projection_as_unclosed_is_ignored function +5 -0
tests/clickhouse_tests.rs:268-274 test_projection_paren_with_string_containing_paren function +7 -0
tests/clickhouse_tests.rs:276-282 test_projection_as_with_string_containing_comma function +7 -0
tests/clickhouse_tests.rs:284-289 test_projection_removal_drops_leading_comma function +6 -0
tests/clickhouse_tests.rs:291-298 test_skip_index_granularity_overflow_falls_back_to_one function +8 -0
tests/clickhouse_tests.rs:300-311 test_schema_aware_rules_ignore_unknown_tables function +12 -0
tests/clickhouse_tests.rs:313-324 test_primary_key_rules_skip_tables_without_sort_key function +12 -0
tests/clickhouse_tests.rs:326-334 test_group_by_string_key_ignores_unknown_columns function +9 -0
tests/config_tests.rs:8-14 test_default_config function +1 -1
tests/config_tests.rs:16-22 test_default_retry_config function +1 -1
tests/config_tests.rs:24-29 test_default_rules_config function +1 -1
tests/config_tests.rs:65-73 test_retry_config_default function +1 -1
tests/config_tests.rs:81-86 test_config_debug function +1 -1
tests/config_tests.rs:88-94 test_llm_config_debug function +1 -1
tests/config_tests.rs:96-102 test_retry_config_debug function +1 -1
tests/config_tests.rs:104-109 test_rules_config_debug function +1 -1
tests/config_tests.rs:165-176 with_home function +12 -0
tests/config_tests.rs:178-191 test_load_home_config_file function +14 -0
tests/config_tests.rs:193-201 test_load_invalid_home_config_errors function +9 -0
tests/config_tests.rs:203-221 test_load_local_config_file_valid_and_invalid function +19 -0
tests/error_tests.rs:8-13 test_file_read_error function +1 -1
tests/error_tests.rs:63-73 test_error_types_are_different function +4 -4
tests/output_tests.rs:21-37 make_violation function +1 -1
tests/output_tests.rs:437-442 test_output_format_debug function +1 -1
tests/output_tests.rs:451-456 test_output_options_debug function +1 -1
tests/output_tests.rs:458-469 test_output_options_clone function +1 -1
tests/output_tests.rs:471-479 test_analysis_result_debug function +1 -1
tests/output_tests.rs:741-748 test_yaml_top_level_scalars_and_empty_containers function +8 -0
tests/output_tests.rs:750-758 test_yaml_nested_empty_containers function +9 -0
tests/output_tests.rs:760-767 test_yaml_quotes_ambiguous_keys function +8 -0
tests/output_tests.rs:769-783 test_yaml_escapes_special_string_values function +15 -0
tests/query_tests.rs:6-15 test_parse_simple_select function +1 -1
tests/query_tests.rs:17-24 test_parse_select_star function +1 -1
tests/query_tests.rs:41-48 test_parse_insert function +1 -1
tests/query_tests.rs:50-58 test_parse_update function +1 -1
tests/query_tests.rs:60-67 test_parse_update_without_where function +1 -1
tests/query_tests.rs:69-76 test_parse_delete function +1 -1
tests/query_tests.rs:78-85 test_parse_delete_without_where function +1 -1
tests/query_tests.rs:397-403 test_recursive_cte function +1 -1
tests/query_tests.rs:441-447 test_clickhouse_simple_select function +1 -1
tests/query_tests.rs:520-533 test_case_expressions_and_compound_identifiers function +14 -0
tests/query_tests.rs:535-545 test_window_function_with_compound_partition_and_order function +11 -0
tests/query_tests.rs:547-557 test_window_functions_in_nested_binary_and_case function +11 -0
tests/rules_tests.rs:22-36 analyze_with_schema function +5 -1
tests/rules_tests.rs:530-541 test_join_on_non_indexed_column_flagged function +2 -2
tests/rules_tests.rs:543-555 test_join_on_indexed_column_ok function +2 -2
tests/rules_tests.rs:594-605 test_schema_with_index function +2 -2
tests/rules_tests.rs:607-624 test_rule_disabled function +1 -1
tests/rules_tests.rs:626-640 test_severity_override function +1 -1
tests/rules_tests.rs:785-796 test_schema_join_column_missing_index function +2 -2
tests/rules_tests.rs:815-826 test_schema_large_table_no_index function +2 -2
tests/schema_tests.rs:18-28 test_parse_multiple_tables function +2 -2
tests/schema_tests.rs:39-49 test_parse_index function +2 -2
tests/schema_tests.rs:51-60 test_parse_unique_index function +2 -2
tests/schema_tests.rs:62-71 test_parse_composite_index function +2 -2
tests/schema_tests.rs:85-99 test_parse_various_types function +2 -2
tests/schema_tests.rs:115-121 test_schema_debug function +1 -1
tests/schema_tests.rs:137-145 test_parse_insert_statement function +2 -2
tests/schema_tests.rs:155-165 test_schema_to_summary_with_index function +2 -2
tests/schema_tests.rs:167-176 test_schema_to_summary_with_unique_index function +2 -2
tests/schema_tests.rs:194-201 test_table_info_debug function +1 -1
tests/schema_tests.rs:203-215 test_column_info_debug function +1 -1
tests/schema_tests.rs:225-235 test_index_info_debug function +1 -1
tests/schema_tests.rs:245-259 test_table_info_clickhouse_fields_default_none function +4 -0
tests/schema_tests.rs:261-269 test_clickhouse_projection_no_phantom_column function +9 -0
tests/schema_tests.rs:271-280 test_clickhouse_dictionary_and_view function +10 -0
tests/schema_tests.rs:282-289 test_clickhouse_nullable_only_for_nullable_type function +8 -0
tests/schema_tests.rs:383-398 test_mysql_inline_index_constraint function +2 -2
tests/schema_tests.rs:400-413 test_mysql_inline_key_constraint function +2 -2
tests/schema_tests.rs:415-441 test_to_summary_includes_all_clickhouse_metadata function +27 -0
tests/schema_tests.rs:443-453 test_to_summary_includes_dictionaries_and_views function +11 -0
tests/schema_tests.rs:455-476 test_create_index_statement_marks_unique function +22 -0
tests/schema_tests.rs:478-483 test_create_index_on_unknown_table_is_ignored function +6 -0
tests/schema_tests.rs:485-496 test_inline_index_constraint_parsed function +12 -0
tests/types_tests.rs:6-10 test_severity_display_info function +1 -1
tests/types_tests.rs:12-16 test_severity_display_warning function +1 -1
tests/types_tests.rs:18-22 test_severity_display_error function +1 -1
tests/types_tests.rs:44-49 test_severity_debug function +1 -1
tests/types_tests.rs:51-55 test_rule_category_display_performance function +1 -1
tests/types_tests.rs:57-61 test_rule_category_display_style function +1 -1
tests/types_tests.rs:63-67 test_rule_category_display_security function +1 -1
tests/types_tests.rs:82-87 test_rule_category_debug function +1 -1
tests/types_tests.rs:135-148 test_violation_debug function +1 -1
tests/types_tests.rs:175-185 test_rule_info_debug function +1 -1
tests/types_tests.rs:261-266 test_analysis_report_debug function +1 -1
Analysis Scope

Analyzed: 43 Rust files

Skipped files:

  • 46 non-Rust files

Skipped file list:

  • .github/dependabot.yml (non-Rust)
  • .github/workflows/_audit.yml (non-Rust)
  • .github/workflows/_build.yml (non-Rust)
  • .github/workflows/_changelog.yml (non-Rust)
  • .github/workflows/_clippy.yml (non-Rust)
  • .github/workflows/_deny.yml (non-Rust)
  • .github/workflows/_detect.yml (non-Rust)
  • .github/workflows/_doc.yml (non-Rust)
  • .github/workflows/_doctest.yml (non-Rust)
  • .github/workflows/_fmt.yml (non-Rust)
  • …and 36 more

Rust Diff Analyzer

@codspeed

codspeed Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 32.63%

2 warnings

⚠️ 12 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 4 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 13 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ preprocess_clickhouse 25.7 ms 58.5 ms -56%
❌ parse_schema_clickhouse 30.3 ms 62.7 ms -51.64%
❌ build_rule_runner_with_schema 1.4 ms 2 ms -29.8%
⚡ format_report[text] 840.2 µs 609.3 µs +37.89%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing big-update (e4d4ce3) with main (9b40ac8)

Open in CodSpeed

Replace the custom tag-driven release chain (_changelog, _tag,
_release-build, _release, _publish, publish-version) with release-plz:
pushes to main only open or update a release PR that bumps the version
and prepends the changelog section; publishing runs only on an explicit
manual dispatch. Binary assets and SBOM/provenance attestations attach
to the release by dedicated workflows triggered by the tag and the
published release.
- features_always_increment_minor: feat commits bump the minor on the
  0.x line, matching the established cadence (0.14 -> 0.15 -> 0.16)
- drop trim from the changelog config and move the separator space
  before the line continuation so commit links render spaced
- capture issue digits without the hash so preprocessed links point
  at issues/N instead of issues/#N
- remove the stale Unreleased section and the stray v1 tag link
  definitions from CHANGELOG.md
Comment thread .github/workflows/release-plz.yml Fixed
Comment thread .github/workflows/release-plz.yml Fixed
Comment thread .github/workflows/release-plz.yml Fixed
Comment thread .github/workflows/release-plz.yml Fixed
@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.62455% with 27 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/output/yaml.rs 96.13% 7 Missing ⚠️
src/preprocessor/clickhouse.rs 97.87% 7 Missing ⚠️
src/llm.rs 98.82% 4 Missing ⚠️
src/rules/clickhouse.rs 99.54% 3 Missing ⚠️
src/config.rs 60.00% 2 Missing ⚠️
src/app/helpers.rs 96.42% 1 Missing ⚠️
src/error.rs 92.85% 1 Missing ⚠️
src/query/extract/expr.rs 88.88% 1 Missing ⚠️
src/query/extract/set_expr.rs 83.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants