Skip to content

Commit f54b0f6

Browse files
fix: update varchar columns to varchar(max) in table diff tests
1 parent e011ac6 commit f54b0f6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tests/core/engine_adapter/integration/test_integration.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,10 @@ def test_table_diff_grain_check_single_key(ctx: TestContext):
22532253
src_table = ctx.table("source")
22542254
target_table = ctx.table("target")
22552255

2256-
columns_to_types = {"key1": exp.DataType.build("int"), "value": exp.DataType.build("varchar")}
2256+
columns_to_types = {
2257+
"key1": exp.DataType.build("int"),
2258+
"value": exp.DataType.build("varchar(max)"),
2259+
}
22572260

22582261
ctx.engine_adapter.create_table(src_table, columns_to_types)
22592262
ctx.engine_adapter.create_table(target_table, columns_to_types)
@@ -2316,8 +2319,8 @@ def test_table_diff_grain_check_multiple_keys(ctx: TestContext):
23162319

23172320
columns_to_types = {
23182321
"key1": exp.DataType.build("int"),
2319-
"key2": exp.DataType.build("varchar"),
2320-
"value": exp.DataType.build("varchar"),
2322+
"key2": exp.DataType.build("varchar(max)"),
2323+
"value": exp.DataType.build("varchar(max)"),
23212324
}
23222325

23232326
ctx.engine_adapter.create_table(src_table, columns_to_types)
@@ -2374,13 +2377,13 @@ def test_table_diff_arbitrary_condition(ctx: TestContext):
23742377

23752378
columns_to_types_src = {
23762379
"id": exp.DataType.build("int"),
2377-
"value": exp.DataType.build("varchar"),
2380+
"value": exp.DataType.build("varchar(max)"),
23782381
"ts": exp.DataType.build("timestamp"),
23792382
}
23802383

23812384
columns_to_types_target = {
23822385
"item_id": exp.DataType.build("int"),
2383-
"value": exp.DataType.build("varchar"),
2386+
"value": exp.DataType.build("varchar(max)"),
23842387
"ts": exp.DataType.build("timestamp"),
23852388
}
23862389

@@ -2441,8 +2444,8 @@ def test_table_diff_identical_dataset(ctx: TestContext):
24412444

24422445
columns_to_types = {
24432446
"key1": exp.DataType.build("int"),
2444-
"key2": exp.DataType.build("varchar"),
2445-
"value": exp.DataType.build("varchar"),
2447+
"key2": exp.DataType.build("varchar(max)"),
2448+
"value": exp.DataType.build("varchar(max)"),
24462449
}
24472450

24482451
ctx.engine_adapter.create_table(src_table, columns_to_types)

0 commit comments

Comments
 (0)