Skip to content

Commit 7f00044

Browse files
Fix DDL test assertions to match actual compiler output
Fix MAP type assertions to include spaces in generated DDL: - MAP<STRING,STRING> -> MAP<STRING, STRING> - MAP<STRING,INTEGER> -> MAP<STRING, INTEGER> This matches the actual SQLAlchemy compiler output which includes spaces after commas in type parameter lists. Fixes CI test failures: - test_create_table_with_map_types - test_create_table_with_struct_types (nested MAP parts) - test_create_table_with_complex_nested_types 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 749efcd commit 7f00044

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/pyathena/sqlalchemy/test_base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,10 +2053,10 @@ def test_create_table_with_map_types(self, engine):
20532053
ddl_string = str(create_ddl)
20542054

20552055
# Verify MAP types are correctly compiled
2056-
assert "attributes MAP<STRING,STRING>" in ddl_string
2057-
assert "metrics MAP<STRING,INTEGER>" in ddl_string
2058-
assert "complex_map MAP<STRING,ROW(value STRING, count INTEGER)>" in ddl_string
2059-
assert "nested_map MAP<STRING,ARRAY<STRING>>" in ddl_string
2056+
assert "attributes MAP<STRING, STRING>" in ddl_string
2057+
assert "metrics MAP<STRING, INTEGER>" in ddl_string
2058+
assert "complex_map MAP<STRING, ROW(value STRING, count INTEGER)>" in ddl_string
2059+
assert "nested_map MAP<STRING, ARRAY<STRING>>" in ddl_string
20602060

20612061
def test_create_table_with_struct_types(self, engine):
20622062
"""Test DDL compilation for STRUCT types."""
@@ -2100,7 +2100,7 @@ def test_create_table_with_struct_types(self, engine):
21002100
assert "user_info ROW(name STRING, age INTEGER, email STRING)" in ddl_string
21012101
assert (
21022102
"nested_struct ROW(personal ROW(first_name STRING, last_name STRING), "
2103-
"preferences MAP<STRING,STRING>)" in ddl_string
2103+
"preferences MAP<STRING, STRING>)" in ddl_string
21042104
)
21052105
assert "struct_with_array ROW(tags ARRAY<STRING>, scores ARRAY<INTEGER>)" in ddl_string
21062106

@@ -2135,7 +2135,7 @@ def test_create_table_with_complex_nested_types(self, engine):
21352135

21362136
# Verify complex nested type is correctly compiled
21372137
expected_type = (
2138-
"data ARRAY<MAP<STRING,ROW(value STRING, metadata MAP<STRING,STRING>, "
2138+
"data ARRAY<MAP<STRING, ROW(value STRING, metadata MAP<STRING, STRING>, "
21392139
"tags ARRAY<STRING>)>>"
21402140
)
21412141
assert expected_type in ddl_string

0 commit comments

Comments
 (0)