Skip to content

Error when trying to create FTS index for column with struct data  #10281

@AndreaFrancis

Description

@AndreaFrancis

What happens?

Previously, with release v0.9.2 3c695d7ba9 it was possible to index columns with struct data.
Now, it fails with the following error:

 Error: Binder Error: No function matches the given name and argument types 'strip_accents(STRUCT("from" VARCHAR, "value" VARCHAR)[])'. You might need to add explicit type casts.
	Candidate functions:
	strip_accents(VARCHAR) -> VARCHAR

To Reproduce

Getting data:

CREATE OR REPLACE TABLE data AS SELECT * FROM "https://huggingface.co/datasets/LDJnr/Puffin/resolve/refs%2Fconvert%2Fparquet/default/train/0000.parquet?download=true";

(Edit:) or load it from a local source:

wget https://huggingface.co/datasets/LDJnr/Puffin/resolve/refs%2Fconvert%2Fparquet/default/train/0000.parquet
CREATE OR REPLACE TABLE data AS SELECT * FROM '0000.parquet';
CREATE OR REPLACE SEQUENCE serial START 0 MINVALUE 0;
ALTER TABLE data ADD COLUMN _id BIGINT DEFAULT nextval('serial');

Try to create index:

PRAGMA create_fts_index('data', '_id', 'conversations');
Error: Binder Error: No function matches the given name and argument types 'strip_accents(STRUCT("from" VARCHAR, "value" VARCHAR)[])'. You might need to add explicit type casts.
	Candidate functions:
	strip_accents(VARCHAR) -> VARCHAR

OS:

Ubuntu 22.04.2 LTS x86_64

DuckDB Version:

v0.9.3-dev2934 dd205d9

DuckDB Client:

v0.9.3-dev2934 dd205d9

Full Name:

Andrea Soria Jimenez

Affiliation:

Hugging Face

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • 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