snowflakedb / snowflake-sqlalchemy

Snowflake SQLAlchemy
https://pypi.python.org/pypi/snowflake-sqlalchemy/
Apache License 2.0
234 stars 152 forks source link

SNOW-1818887: having visit_getitem_binary in SnowflakeCompiler would help to retrieve specific element of array #546

Open AnastasiaTamazlykar opened 2 days ago

AnastasiaTamazlykar commented 2 days ago

What is the current behavior?

there is alternative https://docs.snowflake.com/en/sql-reference/functions/get instead of sql.func.array_agg(col)[0] use sql.func.get(sql.func.array_agg(col),0)

but for example postgres client supports bracket, so would be nice for easiness

What is the desired behavior?

How would this improve snowflake-connector-python?

References, Other Background

sfc-gh-dszmolka commented 7 hours ago

thank you for the enhancement suggestion; the team will consider. Also if you have the possibility, a PR is also welcome for the implementation!