Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit b3f85b9

Browse files
authored
fix: Optimize regex in post-hooks (#623)
1 parent 65c65d6 commit b3f85b9

File tree

1 file changed

+1
-1
lines changed
  • dbt/include/athena/macros/materializations

1 file changed

+1
-1
lines changed

dbt/include/athena/macros/materializations/hooks.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}
44
{% set rendered = render(hook.get('sql')) | trim %}
55
{% if (rendered | length) > 0 %}
6-
{%- if re.match("optimize\W+\w+\W+rewrite data using bin_pack", rendered.lower(), re.MULTILINE) -%}
6+
{%- if re.match("optimize\W+\S+\W+rewrite data using bin_pack", rendered.lower(), re.MULTILINE) -%}
77
{%- do adapter.run_optimize_with_partition_limit_catching(rendered) -%}
88
{%- else -%}
99
{% call statement(auto_begin=inside_transaction) %}

0 commit comments

Comments
 (0)