File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -838,7 +838,7 @@ def _process_time_partitioning(
838838 field = time_partitioning .field
839839 if isinstance (
840840 table .columns [time_partitioning .field ].type ,
841- sqlalchemy .sql .sqltypes .DATE ,
841+ ( sqlalchemy .sql .sqltypes .DATE , sqlalchemy . sql . sqltypes . Date ) ,
842842 ):
843843 return f"PARTITION BY { field } "
844844 elif isinstance (
Original file line number Diff line number Diff line change @@ -193,14 +193,15 @@ def test_table_time_partitioning_with_timestamp_dialect_option(faux_conn):
193193 )
194194
195195
196- def test_table_time_partitioning_with_date_dialect_option (faux_conn ):
196+ @pytest .mark .parametrize ("date_type" , [sqlalchemy .DATE , sqlalchemy .Date ])
197+ def test_table_time_partitioning_with_date_dialect_option (faux_conn , date_type ):
197198 # expect table creation to fail as SQLite does not support partitioned tables
198199 with pytest .raises (sqlite3 .OperationalError ):
199200 setup_table (
200201 faux_conn ,
201202 "some_table_2" ,
202203 sqlalchemy .Column ("id" , sqlalchemy .Integer ),
203- sqlalchemy .Column ("createdAt" , sqlalchemy . DATE ),
204+ sqlalchemy .Column ("createdAt" , date_type ),
204205 bigquery_time_partitioning = TimePartitioning (field = "createdAt" ),
205206 )
206207
You can’t perform that action at this time.
0 commit comments