Expected Behavior
The three existing starrocks__ macro variants compile and produce correct results on a StarRocks cluster.
Current Behavior
Doc-verified against docs.starrocks.io, three starrocks__ variants are buggy:
starrocks__json_extract_value uses json_extract, which does not exist in StarRocks.
starrocks__from_iso8601_timestamp is a bare cast(x as datetime) — a trailing 'Z' or '±HH:MM' makes the cast fail → NULL.
starrocks__array_join silently drops the null_replacement argument, but StarRocks array_join supports the 3rd null_replace_str arg.
Possible Solution
json_query(parse_json({{ json_col }}), {{ json_path }}).
cast(substr(replace(regexp_replace(x, '([Zz]|[+-][0-9]{2}:?[0-9]{2})$', ''), 'T', ' '), 1, 26) as datetime) (StarRocks DATETIME is zone-less; naive and Z-suffixed agree; non-UTC offsets are dropped — acceptable, this project's data is UTC/naive).
- Mirror the Trino branch structure to pass the 3rd arg (docs:
array_join([1,3,5,null],'_','NULL')).
Additional Details
Full report in witan project fact pf-ol-dbt-cross-database-macro-dispatch-state-and-s-086e50.
P1. Part of #2375 (2026-07 dbt warehouse audit). Witan task: tk-fix-3-buggy-starrocks-macro-variants-json-extrac-0d99b6.
Expected Behavior
The three existing
starrocks__macro variants compile and produce correct results on a StarRocks cluster.Current Behavior
Doc-verified against docs.starrocks.io, three
starrocks__variants are buggy:starrocks__json_extract_valueusesjson_extract, which does not exist in StarRocks.starrocks__from_iso8601_timestampis a barecast(x as datetime)— a trailing'Z'or'±HH:MM'makes the cast fail → NULL.starrocks__array_joinsilently drops thenull_replacementargument, but StarRocksarray_joinsupports the 3rdnull_replace_strarg.Possible Solution
json_query(parse_json({{ json_col }}), {{ json_path }}).cast(substr(replace(regexp_replace(x, '([Zz]|[+-][0-9]{2}:?[0-9]{2})$', ''), 'T', ' '), 1, 26) as datetime)(StarRocks DATETIME is zone-less; naive and Z-suffixed agree; non-UTC offsets are dropped — acceptable, this project's data is UTC/naive).array_join([1,3,5,null],'_','NULL')).Additional Details
Full report in witan project fact
pf-ol-dbt-cross-database-macro-dispatch-state-and-s-086e50.P1. Part of #2375 (2026-07 dbt warehouse audit). Witan task:
tk-fix-3-buggy-starrocks-macro-variants-json-extrac-0d99b6.