Skip to content

Unable to run con.sql on previously valid expression #63

Closed

Description

@cpcloud

What happens?

A window function call inside of a scalar call fails in duckdb 1.4.0, and it used to work previously.

To Reproduce

>>> import duckdb
>>> duckdb.sql('select nullif(sum(1) over (rows between unbounded preceding and unbounded following), 1)')

Results in

Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    duckdb.sql('select nullif(sum(1) over (rows between unbounded preceding and unbounded following), 1)')
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_duckdb.NotImplementedException: Not implemented Error: Unimplemented expression class

OS:

linux x86_64

DuckDB Package Version:

1.4.0

Python Version:

3.13.7

Full Name:

Charles Cloud

Affiliation:

Self

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration to reproduce the issue?

  • Yes, I have

Activity

  1. deleted a comment from on Sep 17, 2025
  2. Tishj commented on Sep 17, 2025

    @Tishj
    Member

    Euhm, for a change of pace, I think this should go to core 😅
    I don't think this is anything that Python is doing here

    query I
    select nullif(sum(1) over (rows between unbounded preceding and unbounded following), 1)
    ----
    select nullif(sum(1) over (rows between unbounded preceding and unbounded following), 1);
    ================================================================================
    Actual result:
    ================================================================================
    Not implemented Error: Unimplemented expression class
    
  3. Tishj commented on Sep 17, 2025

    @Tishj
    Member

    @szarnyasg can you move this to duckdb/duckdb ?

  4. evertlammerts commented on Sep 17, 2025

    @evertlammerts
    Member

    Same conclusion:

    DuckDB v1.4.0 (Andium) b8a06e4a22
    Enter ".help" for usage hints.
    Connected to a transient in-memory database.
    Use ".open FILENAME" to reopen on a persistent database.
    D select nullif(sum(1) over (rows between unbounded preceding and unbounded following), 1);
    Not implemented Error:
    Unimplemented expression class
    

    vs

    DuckDB v1.3.2 (Ossivalis) 0b83e5d2f6
    Enter ".help" for usage hints.
    Connected to a transient in-memory database.
    Use ".open FILENAME" to reopen on a persistent database.
    D select nullif(sum(1) over (rows between unbounded preceding and unbounded following), 1);
    ┌─────────────────────────────────────────────────────────────────────────────────────┐
    │ "nullif"(sum(1) OVER (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING), 1) │
    │                                       int128                                        │
    ├─────────────────────────────────────────────────────────────────────────────────────┤
    │                                        NULL                                         │
    └─────────────────────────────────────────────────────────────────────────────────────┘
    
  5. NickCrews commented on Oct 16, 2025

    @NickCrews
    Contributor

    This is no longer present on 1.4.1 (as just tested on https://shell.duckdb.org/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions