We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed3e8f9 commit 85b9d2dCopy full SHA for 85b9d2d
1 file changed
sqlmesh/lsp/hints.py
@@ -63,7 +63,7 @@ def get_hints(
63
def _get_type_hints_for_model_from_query(
64
query: Expression,
65
dialect: str,
66
- columns_to_types: t.Dict[str, t.Any],
+ columns_to_types: t.Dict[str, exp.DataType],
67
start_line: int,
68
end_line: int,
69
) -> t.List[types.InlayHint]:
@@ -97,7 +97,12 @@ def _get_type_hints_for_model_from_query(
97
if line < start_line or line > end_line:
98
continue
99
100
- type_label = str(columns_to_types.get(name))
+ 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)
106
hints.append(
107
types.InlayHint(
108
label=f"::{type_label}",
0 commit comments