Skip to content

Commit 85b9d2d

Browse files
author
Christopher Giroir
committed
fix: ignore UNKNOWN data types
1 parent ed3e8f9 commit 85b9d2d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

sqlmesh/lsp/hints.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_hints(
6363
def _get_type_hints_for_model_from_query(
6464
query: Expression,
6565
dialect: str,
66-
columns_to_types: t.Dict[str, t.Any],
66+
columns_to_types: t.Dict[str, exp.DataType],
6767
start_line: int,
6868
end_line: int,
6969
) -> t.List[types.InlayHint]:
@@ -97,7 +97,12 @@ def _get_type_hints_for_model_from_query(
9797
if line < start_line or line > end_line:
9898
continue
9999

100-
type_label = str(columns_to_types.get(name))
100+
data_type = columns_to_types.get(name)
101+
102+
if not data_type or data_type.is_type(exp.DataType.Type.UNKNOWN):
103+
continue
104+
105+
type_label = str(data_type)
101106
hints.append(
102107
types.InlayHint(
103108
label=f"::{type_label}",

0 commit comments

Comments
 (0)