Skip to content

Conversation

@fivetran-ashashankar
Copy link
Collaborator

No description provided.

@fivetran-ashashankar fivetran-ashashankar changed the title annotate type function for DECODE feat(snowflake): add type annotation for DECODE function support Oct 27, 2025
@fivetran-ashashankar
Copy link
Collaborator Author

fivetran-ashashankar commented Oct 27, 2025

Decode function support is already available . added support to return type annotation for DECODE function.

The annotation now determines the output type based solely on the return values
(ret1, ret2, ..., default), ignoring comparison values.
Copy link
Collaborator

@VaggelisD VaggelisD left a comment

Choose a reason for hiding this comment

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

This is a tough function to annotate, nice work! Leaving a few comments:

…implemented. Fixed the annotate_decode_case function to identify the returntype based on default param and added more tests
Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Let's also add a DECODE(x, 1, 100, NULL) test case, see #6211 (review).

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Great, thanks for addressing all comments @fivetran-ashashankar!

@georgesittas georgesittas merged commit a5458ce into main Oct 30, 2025
7 checks passed
@georgesittas georgesittas deleted the RD-1035644-annotate-type-for-DECODE-function branch October 30, 2025 23:29
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.

5 participants