snowflakedb / snowpark-java-scala

Snowflake Snowpark Java & Scala API
Apache License 2.0
18 stars 20 forks source link

Snow 802269 add locate, randn and ntile functions #146

Closed sfc-gh-gmahadevan closed 3 weeks ago

sfc-gh-gmahadevan commented 3 weeks ago

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #802269

  2. Fill out the following pre-review checklist:

    • [X] I am adding a new automated test(s) to verify correctness of my new code
    • [ ] I am adding new logging messages
    • [ ] I am adding a new telemetry message
    • [ ] I am adding new credentials
    • [ ] I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Add locate, randn and ntile functions for scala and java which takes column name as both ColumnType and StringType

API Description
functions.locate Locate the position of the first occurrence of substr in a string column
functions.ntile NTILE
funstions.randn Generate Random number

Pre-review checklist

(For Snowflake employees)