22
22
set_catalog ,
23
23
)
24
24
from sqlmesh .core .node import IntervalUnit
25
- from sqlmesh .core .schema_diff import SchemaDiffer , TableAlterOperation
25
+ from sqlmesh .core .schema_diff import TableAlterOperation , NestedSupport
26
26
from sqlmesh .utils import optional_import , get_source_columns_to_types
27
27
from sqlmesh .utils .date import to_datetime
28
28
from sqlmesh .utils .errors import SQLMeshError
@@ -68,8 +68,8 @@ class BigQueryEngineAdapter(InsertOverwriteWithMergeMixin, ClusteredByMixin, Row
68
68
MAX_COLUMN_COMMENT_LENGTH = 1024
69
69
SUPPORTED_DROP_CASCADE_OBJECT_KINDS = ["SCHEMA" ]
70
70
71
- SCHEMA_DIFFER = SchemaDiffer (
72
- compatible_types = {
71
+ SCHEMA_DIFFER_KWARGS = {
72
+ " compatible_types" : {
73
73
exp .DataType .build ("INT64" , dialect = DIALECT ): {
74
74
exp .DataType .build ("NUMERIC" , dialect = DIALECT ),
75
75
exp .DataType .build ("FLOAT64" , dialect = DIALECT ),
@@ -83,17 +83,17 @@ class BigQueryEngineAdapter(InsertOverwriteWithMergeMixin, ClusteredByMixin, Row
83
83
exp .DataType .build ("DATETIME" , dialect = DIALECT ),
84
84
},
85
85
},
86
- coerceable_types = {
86
+ " coerceable_types" : {
87
87
exp .DataType .build ("FLOAT64" , dialect = DIALECT ): {
88
88
exp .DataType .build ("BIGNUMERIC" , dialect = DIALECT ),
89
89
},
90
90
},
91
- support_coercing_compatible_types = True ,
92
- parameterized_type_defaults = {
91
+ " support_coercing_compatible_types" : True ,
92
+ " parameterized_type_defaults" : {
93
93
exp .DataType .build ("DECIMAL" , dialect = DIALECT ).this : [(38 , 9 ), (0 ,)],
94
94
exp .DataType .build ("BIGDECIMAL" , dialect = DIALECT ).this : [(76.76 , 38 ), (0 ,)],
95
95
},
96
- types_with_unlimited_length = {
96
+ " types_with_unlimited_length" : {
97
97
# parameterized `STRING(n)` can ALTER to unparameterized `STRING`
98
98
exp .DataType .build ("STRING" , dialect = DIALECT ).this : {
99
99
exp .DataType .build ("STRING" , dialect = DIALECT ).this ,
@@ -103,9 +103,8 @@ class BigQueryEngineAdapter(InsertOverwriteWithMergeMixin, ClusteredByMixin, Row
103
103
exp .DataType .build ("BYTES" , dialect = DIALECT ).this ,
104
104
},
105
105
},
106
- support_nested_operations = True ,
107
- support_nested_drop = False ,
108
- )
106
+ "nested_support" : NestedSupport .ALL_BUT_DROP ,
107
+ }
109
108
110
109
@property
111
110
def client (self ) -> BigQueryClient :
0 commit comments