fix(test): handle IF NOT EXISTS in ClickHouse view regex #62
Merged
wasabi opened 5 days ago

Summary

The ClickHouse view validation regex in test_e2e_platform.py was capturing IF as a view name from CREATE MATERIALIZED VIEW IF NOT EXISTS statements, causing all three PR builds (KI-59, KI-60, KI-61) to fail.

Root Cause

The regex:

CREATE (?:OR REPLACE )?(?:MATERIALIZED )?VIEW (\w+)

Matches CREATE MATERIALIZED VIEW IF NOT EXISTS mv_foo and captures IF as the view name, because the regex doesn't account for the IF NOT EXISTS clause between VIEW and the view name.

Fix

CREATE (?:OR REPLACE )?(?:MATERIALIZED )?VIEW (?:IF NOT EXISTS )?(\w+)

Correctly skips the optional IF NOT EXISTS clause and captures the actual view name.

Verification

  • 15 ClickHouse views with IF NOT EXISTS are now correctly extracted
  • All 3388+ tests should pass
Commits were merged into target branch
  • fix(test): handle IF NOT EXISTS in ClickHouse view regex
    The test regex for ClickHouse views was:
      CREATE (?:OR REPLACE )?(?:MATERIALIZED )?VIEW (\w+)
    
    This matched 'CREATE MATERIALIZED VIEW IF NOT EXISTS mv_foo' and
    captured 'IF' as the view name, causing all ClickHouse view
    validation to fail.
    
    Fixed to:
      CREATE (?:OR REPLACE )?(?:MATERIALIZED )?VIEW (?:IF NOT EXISTS )?(\w+)
    
    This correctly skips the optional IF NOT EXISTS clause and captures
    the actual view name.
    5 days ago
  • wasabi merged 5 days ago
1/1
Submitter wasabi
Target main
Source fix/clickhouse-view-regex
Jobs
Merge Strategy
Create Merge Commit
Watchers (1)
Reference
pull request KI-62
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover