@@ -842,9 +842,9 @@ def test_merge_upsert(make_mocked_engine_adapter: t.Callable, assert_exp_eq):
842842 target_table = "target" ,
843843 source_table = t .cast (exp .Select , parse_one ('SELECT "ID", ts, val FROM source' )),
844844 columns_to_types = {
845- "ID" : exp .DataType .Type . INT ,
846- "ts" : exp .DataType .Type . TIMESTAMP ,
847- "val" : exp .DataType .Type . INT ,
845+ "ID" : exp .DataType .build ( "int" ) ,
846+ "ts" : exp .DataType .build ( "timestamp" ) ,
847+ "val" : exp .DataType .build ( "int" ) ,
848848 },
849849 unique_key = [exp .to_identifier ("ID" , quoted = True )],
850850 )
@@ -873,9 +873,9 @@ def test_merge_upsert(make_mocked_engine_adapter: t.Callable, assert_exp_eq):
873873 target_table = "target" ,
874874 source_table = parse_one ("SELECT id, ts, val FROM source" ),
875875 columns_to_types = {
876- "id" : exp .DataType .Type . INT ,
877- "ts" : exp .DataType .Type . TIMESTAMP ,
878- "val" : exp .DataType .Type . INT ,
876+ "id" : exp .DataType .build ( "int" ) ,
877+ "ts" : exp .DataType .build ( "timestamp" ) ,
878+ "val" : exp .DataType .build ( "int" ) ,
879879 },
880880 unique_key = [exp .column ("id" ), exp .column ("ts" )],
881881 )
@@ -894,9 +894,9 @@ def test_merge_upsert_pandas(make_mocked_engine_adapter: t.Callable):
894894 target_table = "target" ,
895895 source_table = df ,
896896 columns_to_types = {
897- "id" : exp .DataType .Type . INT ,
898- "ts" : exp .DataType .Type . TIMESTAMP ,
899- "val" : exp .DataType .Type . INT ,
897+ "id" : exp .DataType .build ( "int" ) ,
898+ "ts" : exp .DataType .build ( "timestamp" ) ,
899+ "val" : exp .DataType .build ( "int" ) ,
900900 },
901901 unique_key = [exp .to_identifier ("id" )],
902902 )
@@ -911,9 +911,9 @@ def test_merge_upsert_pandas(make_mocked_engine_adapter: t.Callable):
911911 target_table = "target" ,
912912 source_table = df ,
913913 columns_to_types = {
914- "id" : exp .DataType .Type . INT ,
915- "ts" : exp .DataType .Type . TIMESTAMP ,
916- "val" : exp .DataType .Type . INT ,
914+ "id" : exp .DataType .build ( "int" ) ,
915+ "ts" : exp .DataType .build ( "timestamp" ) ,
916+ "val" : exp .DataType .build ( "int" ) ,
917917 },
918918 unique_key = [exp .to_identifier ("id" ), exp .to_identifier ("ts" )],
919919 )
@@ -931,9 +931,9 @@ def test_merge_when_matched(make_mocked_engine_adapter: t.Callable, assert_exp_e
931931 target_table = "target" ,
932932 source_table = t .cast (exp .Select , parse_one ('SELECT "ID", ts, val FROM source' )),
933933 columns_to_types = {
934- "ID" : exp .DataType .Type . INT ,
935- "ts" : exp .DataType .Type . TIMESTAMP ,
936- "val" : exp .DataType .Type . INT ,
934+ "ID" : exp .DataType .build ( "int" ) ,
935+ "ts" : exp .DataType .build ( "timestamp" ) ,
936+ "val" : exp .DataType .build ( "int" ) ,
937937 },
938938 unique_key = [exp .to_identifier ("ID" , quoted = True )],
939939 when_matched = exp .When (
0 commit comments