Skip to content

Commit a2af614

Browse files
NOSNOW: Expect ICEBERG_VERSION = 2 in tests with Iceberg get_ddl assertions (#4136)
Co-authored-by: Jonathan Shi <149419494+sfc-gh-joshi@users.noreply.github.com>
1 parent c29aa25 commit a2af614

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/integ/scala/test_dataframe_copy_into.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def test_copy_into_csv_iceberg(
281281
ddl = session._run_query(f"select get_ddl('table', '{test_table_name}')")
282282
assert (
283283
ddl[0][0]
284-
== f"create or replace ICEBERG TABLE {test_table_name} (\n\tA LONG,\n\tB STRING,\n\tC DOUBLE\n)\n PARTITION BY (B, BUCKET(10, A), TRUNCATE(3, B))\n EXTERNAL_VOLUME = 'PYTHON_CONNECTOR_ICEBERG_EXVOL'\n CATALOG = 'SNOWFLAKE'\n BASE_LOCATION = 'snowpark_python_tests/';"
284+
== f"create or replace ICEBERG TABLE {test_table_name} (\n\tA LONG,\n\tB STRING,\n\tC DOUBLE\n)\n PARTITION BY (B, BUCKET(10, A), TRUNCATE(3, B))\n EXTERNAL_VOLUME = 'PYTHON_CONNECTOR_ICEBERG_EXVOL'\n ICEBERG_VERSION = 2\n CATALOG = 'SNOWFLAKE'\n BASE_LOCATION = 'snowpark_python_tests/';"
285285
)
286286
# Check that a copy_into works on the newly created table.
287287
df.copy_into_table(test_table_name)

tests/integ/scala/test_dataframe_writer_suite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def test_iceberg_partition_by(session, local_testing_mode):
299299
ddl[0][0] == f"create or replace ICEBERG TABLE {table_name_1} (\n\t"
300300
f"A STRING,\n\tB LONG\n)\n "
301301
f"PARTITION BY (B)\n "
302-
f"EXTERNAL_VOLUME = 'PYTHON_CONNECTOR_ICEBERG_EXVOL'\n CATALOG = 'SNOWFLAKE';"
302+
f"EXTERNAL_VOLUME = 'PYTHON_CONNECTOR_ICEBERG_EXVOL'\n ICEBERG_VERSION = 2\n CATALOG = 'SNOWFLAKE';"
303303
)
304304

305305
finally:

tests/integ/scala/test_datatype_suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def test_structured_dtypes_iceberg(
560560
assert save_ddl[0][0] == (
561561
f"create or replace ICEBERG TABLE {table_name.upper()} (\n\t"
562562
"MAP MAP(STRING, LONG),\n\tOBJ OBJECT(A STRING, b DOUBLE),\n\tARR ARRAY(DOUBLE)\n)\n "
563-
"EXTERNAL_VOLUME = 'PYTHON_CONNECTOR_ICEBERG_EXVOL'\n CATALOG = 'SNOWFLAKE'\n "
563+
"EXTERNAL_VOLUME = 'PYTHON_CONNECTOR_ICEBERG_EXVOL'\n ICEBERG_VERSION = 2\n CATALOG = 'SNOWFLAKE'\n "
564564
"BASE_LOCATION = 'python_connector_merge_gate/';"
565565
)
566566

@@ -588,7 +588,7 @@ def test_structured_dtypes_iceberg(
588588
f"create or replace dynamic iceberg table {dynamic_table_name}(\n\tMAP,\n\tOBJ,\n\tARR\n)"
589589
" target_lag = '16 hours, 40 minutes' refresh_mode = AUTO initialize = ON_CREATE "
590590
f"warehouse = {warehouse} external_volume = 'PYTHON_CONNECTOR_ICEBERG_EXVOL' "
591-
"catalog = 'SNOWFLAKE' base_location = 'python_connector_merge_gate/' \n as "
591+
"catalog = 'SNOWFLAKE' ICEBERG_VERSION = 2 base_location = 'python_connector_merge_gate/' \n as "
592592
f"SELECT * \n FROM (\n SELECT * FROM {formatted_table_name}\n);"
593593
)
594594

0 commit comments

Comments
 (0)