Skip to content

Commit 1fb3be8

Browse files
author
Bradley Shawyer
committed
fix: LT05 panic when trying to remove elements from a sequence out of bounds
1 parent 7ac18bd commit 1fb3be8

File tree

1 file changed

+29
-0
lines changed
  • crates/lib/test/fixtures/rules/std_rule_cases

1 file changed

+29
-0
lines changed

crates/lib/test/fixtures/rules/std_rule_cases/LT05.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,3 +713,32 @@ test_pass_window_function:
713713
order by d desc
714714
) as rnk
715715
from foo
716+
717+
test_long_line_with_jinja_template:
718+
# Test handling of long lines with Jinja templates to avoid index out of bounds
719+
pass_str: |
720+
{{ config(
721+
materialized = 'table',
722+
tags = ["tag1", "tag2", "tag3", "tag4", "tag5", "tag6", "tag7", "tag8", "tag9", "tag10"]
723+
) }}
724+
725+
WITH date_series AS (
726+
SELECT DATE(DATEADD(month,
727+
ROW_NUMBER() OVER (
728+
PARTITION BY cm.customer_external_id,
729+
cm.subscription_external_id,
730+
cm.uuid
731+
ORDER BY cm.date
732+
) - 1,
733+
cm.date
734+
) AS calendar_date
735+
FROM {{ source("some_schema", "some_table") }} AS cm
736+
)
737+
SELECT * FROM date_series
738+
configs:
739+
core:
740+
max_line_length: 80
741+
templater:
742+
jinja:
743+
context:
744+
source: my_source

0 commit comments

Comments
 (0)