SNOW-857053: current_schemas() not really pythonic
Please answer these questions before submitting your issue. Thanks!
- What version of Python are you using?
3.8.17
- What operating system and processor architecture are you using?
macOS-13.4.1-arm64-arm-64bit
- What are the component versions in the environment (
pip freeze)?
Irrelevant.
- What did you do?
Ran this:
>>> session.create_dataframe([1]).select(functions.current_schemas()).collect()[0]["CURRENT_SCHEMAS()"]
'["MYDB.PUBLIC"]'
- What did you expect to see?
A list of schemas, not a string that should be evaluated.
thanks for your feedback. I concur with you that it's more pythonic if the returning is list of strings. we will think about this holistically as there are other APIs which are non-pythonic, also changing the returning is a breaking change.
I would also love to see this changed but see the point of a breaking change here. Nevertheless with semantic versioning and just moving to another major version this should be no problem. It really makes no sense to return a string here that everyone will eval in the next step, which is evil ;-)