From e0978782ec8310c6e4adff80920f84849b57978c Mon Sep 17 00:00:00 2001 From: Elon Gliksberg Date: Sun, 8 Oct 2023 15:58:18 +0300 Subject: [PATCH] Check if 'column_size' is defined. --- macros/utils/graph/get_compiled_code.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macros/utils/graph/get_compiled_code.sql b/macros/utils/graph/get_compiled_code.sql index 22e0be9fc..97a05fe78 100644 --- a/macros/utils/graph/get_compiled_code.sql +++ b/macros/utils/graph/get_compiled_code.sql @@ -1,7 +1,8 @@ {% macro get_compiled_code(node, as_column_value=false) %} {% set compiled_code = adapter.dispatch("get_compiled_code", "elementary")(node) %} - {% if as_column_value and compiled_code | length > elementary.get_column_size() %} + {% set max_column_size = elementary.get_column_size() %} + {% if as_column_value and max_column_size and compiled_code | length > max_column_size %} {% do return(elementary.get_compiled_code_too_long_err_msg()) %} {% endif %}