snowflakedb / snowpark-python

Snowflake Snowpark Python API
Apache License 2.0
266 stars 110 forks source link

SNOW-1568022: Add optional parameters argument to Column.regexp and Column.rlike #2011

Open sfc-gh-ncrouch opened 3 months ago

sfc-gh-ncrouch commented 3 months ago

What is the current behavior?

snowflake.snowpark.Column.regexp and its alias snowflake.snowpark.Column.rlike both have a signature of Column.regexp(pattern: Union[Column, str]) but the SQL REGEXP also accepts the optional argument parameters: Union[Column, str].

What is the desired behavior?

Optional argument parameters added to Python API.

How would this improve snowflake-snowpark-python?

Add easy access to case-sensitivity controls, multi-line mode and sub-match extraction

References, Other Background

https://docs.snowflake.com/en/sql-reference/functions/rlike

sfc-gh-sghosh commented 2 months ago

Hello @sf-gh-ncrouch ,

Thanks for raising the concern, I will check if there are any plans to support it, will update

Regards, Sujan

sfc-gh-sghosh commented 2 months ago

Hello @sf-gh-ncrouch ,

We are working on it, the fix has been merged.

Regards, Sujan