Closed saulbein closed 1 month ago
I am also getting this warning. Can someone from this snowflake team please review and merge this?
Hello, I am getting this warning as well. Can someone please review and merge this?
i see another PR going (https://github.com/snowflakedb/snowflake-sqlalchemy/pull/532) which is also already merged and awaiting release, which hopefully helps with the issue
Please answer these questions before submitting your pull requests. Thanks!
What issue is this PR addressing?
When loading
snowflake-sqlalchemy==1.6.1
a warning is emitted about theflatten
function being registered multiple times. It causes confusion as it's we had to check that our code wasn't overriding the function, while in reality it'ssnowflake-sqlalchemy
registering it twice.Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
As noted in SQLAlchemy documentation:
Which in this case means that current code is registering the function twice - once on class import time and another by explicitly calling
register_function
. This PR removes the explicit registration and pushes the class import to be executed immediately when importing the library.