Skip to content

SNOW-2397758: Add parameter for aliasing interval function names#3859

Merged
sfc-gh-aling merged 2 commits intomainfrom
fhe-SNOW-2397758-add-parameter-for-aliasing
Oct 20, 2025
Merged

SNOW-2397758: Add parameter for aliasing interval function names#3859
sfc-gh-aling merged 2 commits intomainfrom
fhe-SNOW-2397758-add-parameter-for-aliasing

Conversation

@sfc-gh-fhe
Copy link
Contributor

@sfc-gh-fhe sfc-gh-fhe commented Oct 7, 2025

  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
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

Currently we alias the column name for the interval_day_time_from_parts and interval_year_month_from_parts functions. However, it runs into a bug when we try to use it in a when statement. So, I'm introducing a parameter to allow us to use / not use the alias at will.

@sfc-gh-fhe sfc-gh-fhe force-pushed the fhe-SNOW-2392212-fix-floating-point-errors-in-interval-day-time-from-parts branch from 57c3e23 to e1cd070 Compare October 7, 2025 20:12
@sfc-gh-fhe sfc-gh-fhe force-pushed the fhe-SNOW-2397758-add-parameter-for-aliasing branch from d32c53e to c0abee7 Compare October 7, 2025 20:58
@sfc-gh-fhe sfc-gh-fhe marked this pull request as ready for review October 7, 2025 20:59
@sfc-gh-fhe sfc-gh-fhe requested review from a team as code owners October 7, 2025 20:59
@sfc-gh-fhe sfc-gh-fhe requested review from sfc-gh-aling, sfc-gh-mayliu and sfc-gh-yixie and removed request for a team October 7, 2025 20:59
Base automatically changed from fhe-SNOW-2392212-fix-floating-point-errors-in-interval-day-time-from-parts to main October 9, 2025 17:09
@sfc-gh-fhe sfc-gh-fhe force-pushed the fhe-SNOW-2397758-add-parameter-for-aliasing branch 2 times, most recently from 65ac4ea to 22d40a3 Compare October 14, 2025 18:53
Comment on lines +11096 to +11097
res = cast(interval_string, "INTERVAL YEAR TO MONTH")
if _alias_column_name:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this shows the need for a server side implementation for this function.

@sfc-gh-fhe sfc-gh-fhe force-pushed the fhe-SNOW-2397758-add-parameter-for-aliasing branch from 22d40a3 to 76feec6 Compare October 15, 2025 17:37
@sfc-gh-fhe sfc-gh-fhe force-pushed the fhe-SNOW-2397758-add-parameter-for-aliasing branch from 76feec6 to 2ef8b10 Compare October 20, 2025 17:24
@sfc-gh-aling sfc-gh-aling merged commit 7fb986b into main Oct 20, 2025
28 of 29 checks passed
@sfc-gh-aling sfc-gh-aling deleted the fhe-SNOW-2397758-add-parameter-for-aliasing branch October 20, 2025 18:50
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants