File tree Expand file tree Collapse file tree 11 files changed +44
-12
lines changed
src/dbt/include/global_project/macros/materializations/functions
src/dbt/include/bigquery/macros/materializations/functions
tests/functional/functions
src/dbt/include/redshift/macros/materializations/functions
src/dbt/include/snowflake/macros/materializations/functions
src/dbt/tests/adapter/functions Expand file tree Collapse file tree 11 files changed +44
-12
lines changed Original file line number Diff line number Diff line change 1+ kind : Fixes
2+ body : Fix referenced function property names in function macros
3+ time : 2025-10-02T11:50:32.228639-05:00
4+ custom :
5+ Author : QMalcolm
6+ Issue : " 1365"
Original file line number Diff line number Diff line change 1212{% endmacro %}
1313
1414{% macro default__scalar_function_create_replace_signature_sql(target_relation) %}
15- CREATE OR REPLACE FUNCTION {{ target_relation .render () }} ({{ formatted_scalar_function_args_sql()}}) RETURNS {{ model .return_type .type }} AS
15+ CREATE OR REPLACE FUNCTION {{ target_relation .render () }} ({{ formatted_scalar_function_args_sql()}})
16+ RETURNS {{ model .returns .data_type }}
17+ AS
1618{% endmacro %}
1719
1820{% macro formatted_scalar_function_args_sql() %}
2224{% macro default__formatted_scalar_function_args_sql() %}
2325 {% set args = [] %}
2426 {% for arg in model .arguments - %}
25- {%- do args .append (arg .name ~ ' ' ~ arg .type ) - %}
27+ {%- do args .append (arg .name ~ ' ' ~ arg .data_type ) - %}
2628 {%- endfor %}
2729 {{ args | join (' , ' ) }}
2830{% endmacro %}
Original file line number Diff line number Diff line change 1+ kind : Fixes
2+ body : Fix references to function properties in function macros
3+ time : 2025-10-02T12:10:22.720046-05:00
4+ custom :
5+ Author : QMalcolm
6+ Issue : " 1365"
Original file line number Diff line number Diff line change 11{% macro bigquery__scalar_function_create_replace_signature_sql(target_relation) %}
22 CREATE OR REPLACE FUNCTION {{ target_relation .render () }} ({{ formatted_scalar_function_args_sql()}})
3- RETURNS {{ model .return_type .type }}
3+ RETURNS {{ model .returns .data_type }}
44 AS
55{% endmacro %}
66
Original file line number Diff line number Diff line change 88 description: Calculate the price for the xlarge version of a standard item
99 arguments:
1010 - name: price
11- type : numeric
11+ data_type : numeric
1212 description: The price of the standard item
13- return_type :
14- type : numeric
13+ returns :
14+ data_type : numeric
1515 description: The resulting xlarge price
1616"""
Original file line number Diff line number Diff line change 1+ kind : Fixes
2+ body : Fix references to function properties in function macros
3+ time : 2025-10-02T12:09:29.303025-05:00
4+ custom :
5+ Author : QMalcolm
6+ Issue : " 1365"
Original file line number Diff line number Diff line change 11{% macro redshift__scalar_function_create_replace_signature_sql(target_relation) %}
22 CREATE OR REPLACE FUNCTION {{ target_relation .render () }} ({{ formatted_scalar_function_args_sql()}})
3- RETURNS {{ model .return_type .type }}
3+ RETURNS {{ model .returns .data_type }}
44 {# TODO: Stop defaulting to VOLATILE once we have a way to set the volatility #}
55 {# We set a default here because redshift requires a volatility to be set #}
66 VOLATILE
1010{% macro redshift__formatted_scalar_function_args_sql() %}
1111 {% set args = [] %}
1212 {% for arg in model .arguments - %}
13- {%- do args .append (arg .type ) - %}
13+ {%- do args .append (arg .data_type ) - %}
1414 {%- endfor %}
1515 {{ args | join (' , ' ) }}
1616{% endmacro %}
Original file line number Diff line number Diff line change 1+ kind : Fixes
2+ body : Fix references to function properties in funciton macros
3+ time : 2025-10-02T12:06:39.049296-05:00
4+ custom :
5+ Author : QMalcolm
6+ Issue : " 1365"
Original file line number Diff line number Diff line change 11{% macro snowflake__scalar_function_create_replace_signature_sql(target_relation) %}
22 CREATE OR REPLACE FUNCTION {{ target_relation .render () }} ({{ formatted_scalar_function_args_sql()}})
3- RETURNS {{ model .return_type .type }}
3+ RETURNS {{ model .returns .data_type }}
44 LANGUAGE SQL
55 AS
66{% endmacro %}
Original file line number Diff line number Diff line change 1+ kind : Fixes
2+ body : Fix file fixtures for functions to use proper function property names
3+ time : 2025-10-02T11:52:59.273372-05:00
4+ custom :
5+ Author : QMalcolm
6+ Issue : " 1365"
You can’t perform that action at this time.
0 commit comments