Skip to content

Adding NULL to a date fails on Snowflake #441

Open

Description

@jat255

A definition that adds NULL to a date fails on Snowflake. created + NULL compiles to "created" + NULL, and Snowflake rejects it: Invalid argument types for function '+': (DATE, NULL).

The type checker reads the expression as a temporal shift, because an untyped NULL is accepted as the interval, and gives it the type datetime. The emitters rewrite a temporal shift only when an operand has the type interval, so this one falls through to a plain +. Both packages have the same fault: _temporal_shift() and definition_sql_temporal_shift().

Found by running the corpus definition nullable date shift on Snowflake, with the live tests in #434.

Activity

  1. added
    bugSomething isn't working
    rAffects the R implementation
    pyAffects the Python implementation
    on Oct 21, 2026
  2. self-assigned this
    on Oct 21, 2026
  3. added 2 commits that reference this issue on Oct 22, 2026
    4e4c282
    0f3a362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpyAffects the Python implementationrAffects the R implementation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions