Skip to content

Internal error with fill window function #17861

@soerenwolfers

Description

@soerenwolfers

What happens?

Bad inputs to the fill window function result in internal error.

To Reproduce

import duckdb
duckdb.query("""
SELECT 
    fill(y) OVER (ORDER BY t)
FROM (VALUES (1, NULL), (2, 'Infinity')) _(t, y)
""")
---------------------------------------------------------------------------
InternalException                         Traceback (most recent call last)
File /persist/venv/lib/python3.10/site-packages/IPython/core/formatters.py:770, in PlainTextFormatter.__call__(self, obj)
    763 stream = StringIO()
    764 printer = pretty.RepresentationPrinter(stream, self.verbose,
    765     self.max_width, self.newline,
    766     max_seq_length=self.max_seq_length,
    767     singleton_pprinters=self.singleton_printers,
    768     type_pprinters=self.type_printers,
    769     deferred_pprinters=self.deferred_printers)
--> 770 printer.pretty(obj)
    771 printer.flush()
    772 return stream.getvalue()

File /persist/venv/lib/python3.10/site-packages/IPython/lib/pretty.py:419, in RepresentationPrinter.pretty(self, obj)
    408                         return meth(obj, self, cycle)
    409                 if (
    410                     cls is not object
    411                     # check if cls defines __repr__
   (...)
    417                     and callable(_safe_getattr(cls, "__repr__", None))
    418                 ):
--> 419                     return _repr_pprint(obj, self, cycle)
    421     return _default_pprint(obj, self, cycle)
    422 finally:

File /persist/venv/lib/python3.10/site-packages/IPython/lib/pretty.py:794, in _repr_pprint(obj, p, cycle)
    792 """A pprint that just redirects to the normal repr function."""
    793 # Find newlines and replace them with p.break_()
--> 794 output = repr(obj)
    795 lines = output.splitlines()
    796 with p.group():

InternalException: INTERNAL Error: Unsupported FILL slow ordering type.

Stack Trace:

/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb9Exception6ToJSONENS_13ExceptionTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x56) [0x7fe6ee16dff6]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb9ExceptionC2ENS_13ExceptionTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x14) [0x7fe6ee16e0a4]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb17InternalExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x11) [0x7fe6ee170a91]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(+0xa16a86) [0x7fe6ed34da86]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZNK6duckdb14WindowExecutor8EvaluateEmRNS_9DataChunkERNS_6VectorERNS_24WindowExecutorLocalStateERNS_25WindowExecutorGlobalStateE+0xec) [0x7fe6eeb1bcfc]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb22WindowLocalSourceState7GetDataERNS_9DataChunkE+0x193) [0x7fe6ee60a283]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb22WindowLocalSourceState11ExecuteTaskERNS_9DataChunkE+0x8b) [0x7fe6ee60a73b]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZNK6duckdb14PhysicalWindow7GetDataERNS_16ExecutionContextERNS_9DataChunkERNS_19OperatorSourceInputE+0xab) [0x7fe6ee60ddab]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb16PipelineExecutor15FetchFromSourceERNS_9DataChunkE+0x7d) [0x7fe6eecbb02d]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb16PipelineExecutor7ExecuteEm+0xb8) [0x7fe6eecc5768]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb12PipelineTask11ExecuteTaskENS_17TaskExecutionModeE+0xd2) [0x7fe6eecc5aa2]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb12ExecutorTask7ExecuteENS_17TaskExecutionModeE+0xd6) [0x7fe6eecbcb26]
/persist/venv/lib/python3.10/site-packages/duckdb/duckdb.cpython-310-x86_64-linux-gnu.so(_ZN6duckdb13TaskScheduler14ExecuteForeverEPSt6atomicIbE+0x142) [0x7fe6eecbf202]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xdc253) [0x7fe7766bf253]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7fe777506ac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850) [0x7fe777598850]

This error signals an assertion failure within DuckDB. This usually occurs due to unexpected conditions or errors in the program's logic.
For more information, see https://duckdb.org/docs/stable/dev/internal_errors

OS:

Linux

DuckDB Version:

1.3.1-dev155

DuckDB Client:

Python

Hardware:

.

Full Name:

Soeren Wolfers

Affiliation:

G-Research

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

I have tested with a nightly build

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 (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have

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