snowflakedb / snowpark-java-scala

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

Snow 802269 add log10, log1p, base64 and unbase64 functions #143

Closed sfc-gh-gmahadevan closed 4 weeks ago

sfc-gh-gmahadevan commented 4 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 log10 and log1p functions for scala and java which takes column name as both ColumnType and StringType

API Description
function.log10 Computes the logarithm of the given column in base 10
functions.log1p Computes the natural logarithm of the given value plus one
functions.base64 Computes the BASE64 encoding of a column and returns it as a string column.
functions.unbase64 Decodes a BASE64 encoded string column and returns it as a column.

Pre-review checklist

(For Snowflake employees)