googleapis / python-bigquery-sqlalchemy

SQLAlchemy dialect for BigQuery
MIT License
436 stars 130 forks source link

Time partitioning on Date column fails with type_="DAY" #1115

Open bnaul opened 1 month ago

bnaul commented 1 month ago

Not exactly a duplicate of #1056! The fix for that issue copied the standard that was present of checking vs DATE, but sa.Date should also be valid and weirdly enough changing that is enough to break things, with the same error as #1056 regarding DATE_TRUNC (since the if block that was added does not catch sa.Date, just sa.DATE).

cc @chalmerlowe this seems potentially relevant to your work in #1113

chalmerlowe commented 1 month ago

I will take a look at this. May not happen until Monday. Thanks for reaching out.

chalmerlowe commented 1 month ago

I see what you are trying to accomplish. I would like to finish off my other bucket of work (#1113) and get that merged. Once that is done, I think we can come back and add this to the mix in the appropriate places.