Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1871755: Support more snowflake built-in functions #2750

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-aling
Copy link
Contributor

@sfc-gh-aling sfc-gh-aling commented Dec 11, 2024

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

    Fixes SNOW-NNNNNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
  3. Please describe how your code solves the related issue.

implement 26 missing built-in functions

  - `acosh`
  - `asinh`
  - `atanh`
  - `bit_length`
  - `bitmap_bit_position`
  - `bitmap_bucket_number`
  - `bitmap_construct_agg`
  - `cbrt`
  - `equal_null`
  - `ifnull`
  - `localtimestamp`
  - `max_by`
  - `min_by`
  - `nvl`
  - `octet_length`
  - `position`
  - `regr_avgx`
  - `regr_avgy`
  - `regr_count`
  - `regr_intercept`
  - `regr_r2`
  - `regr_slope`
  - `regr_sxx`
  - `regr_sxy`
  - `regr_syy`
  - `try_to_binary`

@sfc-gh-aling sfc-gh-aling changed the title test impl SNOW-1871755: Support more snowflake built-in functions Jan 9, 2025
@sfc-gh-aling sfc-gh-aling marked this pull request as ready for review January 9, 2025 18:44
@sfc-gh-aling sfc-gh-aling requested review from a team as code owners January 9, 2025 18:44
Copy link
Contributor

@sfc-gh-jrose sfc-gh-jrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of nits.

- `localtimestamp`
- `max_by`
- `min_by`
- `nvl`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is neither in functions.rst or functions.py

Copy link
Contributor

@sfc-gh-aalam sfc-gh-aalam Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it in functions.py nvl = ifnull must rst is missing

@publicapi
def cbrt(e: ColumnOrName, _emit_ast: bool = True) -> Column:
"""
Returns the cube root of the records in a group.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Returns the cube root of the records in a group.
Returns the cube root of value in a column.```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants