Skip to content

An error was encountered using both distinct and struct #14286

@icefery

Description

@icefery

What happens?

image

To Reproduce

select 
    category,
    array_agg(distinct name) filter(where id != 5)            as a_list,
    array_agg(name)          filter(where id != 5)            as b_list,
    array_agg({'id': id, 'name': name, 'catetory': category}) as c_list
from (
    select 1 as id, '大熊猫' as name, '' as category union all
    select 2 as id, '大熊猫' as name, '' as category union all
    select 3 as id, '小熊猫' as name, '' as category
) t
group by category;
INTERNAL Error: Attempted to dereference shared_ptr that is NULL!
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/dev/internal_errors

OS:

ubuntu/x86_64

DuckDB Version:

v1.1.1 af39bd0

DuckDB Client:

cli

Hardware:

No response

Full Name:

icefery

Affiliation:

icefery@163.com

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

I have not tested with any build

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

No - Other reason (please specify in the issue body)

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