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.
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
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.
Summary
The ClickHouse view validation regex in
test_e2e_platform.pywas capturingIFas a view name fromCREATE MATERIALIZED VIEW IF NOT EXISTSstatements, causing all three PR builds (KI-59, KI-60, KI-61) to fail.Root Cause
The regex:
Matches
CREATE MATERIALIZED VIEW IF NOT EXISTS mv_fooand capturesIFas the view name, because the regex doesn't account for theIF NOT EXISTSclause betweenVIEWand the view name.Fix
Correctly skips the optional
IF NOT EXISTSclause and captures the actual view name.Verification
IF NOT EXISTSare now correctly extracted