Skip to content

Commit 50e7e1d

Browse files
authored
fix: handle imported tables without comments (#3)
1 parent cbe1ead commit 50e7e1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

create_view_with_comments_procedure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def CREATE_VIEW_WITH_COLUMN_COMMENTS(
7070
columns.append(f"{col_name}")
7171

7272
# Escape single quotes in the comment string to make it a valid SQL literal
73-
escaped_comment = col_comment.replace("'", "''")
73+
escaped_comment = col_comment.replace("'", "''") if col_comment else ""
7474
column_row = f" {col_name} COMMENT '{escaped_comment}'"
7575
columns_with_comments.append(column_row)
7676

0 commit comments

Comments
 (0)