File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
sqlmesh/core/engine_adapter Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1818
1919from sqlglot import Dialect , exp
2020from sqlglot .errors import ErrorLevel
21- from sqlglot .helper import ensure_list
21+ from sqlglot .helper import ensure_list , seq_get
2222from sqlglot .optimizer .qualify_columns import quote_identifiers
2323
2424from sqlmesh .core .dialect import (
@@ -1887,11 +1887,7 @@ def remove_managed_columns(
18871887 # column names and then remove them from the unmanaged_columns
18881888 if check_columns :
18891889 # Handle both Star directly and [Star()] (which can happen during serialization/deserialization)
1890- if isinstance (check_columns , exp .Star ) or (
1891- isinstance (check_columns , list )
1892- and len (check_columns ) == 1
1893- and isinstance (check_columns [0 ], exp .Star )
1894- ):
1890+ if isinstance (seq_get (ensure_list (check_columns ), 0 ), exp .Star ):
18951891 check_columns = [exp .column (col ) for col in unmanaged_columns_to_types ]
18961892 execution_ts = (
18971893 exp .cast (execution_time , time_data_type , dialect = self .dialect )
You can’t perform that action at this time.
0 commit comments