Consider loading ICU by default on bundled DuckDB connections

Aberta
#591 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 6 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
22/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Ativa
Stack de tecnologia
rust, sql
Domínio
databases

Direção de pesquisa

The issue asks maintainers to choose among several options for loading the ICU extension in the bundled DuckDB engine, so there is no single change to make yet. Start by reproducing the binder error with SELECT TIMESTAMPTZ '2026-10-14 05:00:00+00' - INTERVAL 1 MONTH; and checking duckdb_extensions() before and after INSTALL icu; LOAD icu. Done means a maintainer has picked a direction, such as static linking, loading on connection open, or documenting the behaviour, and the team has agreed on it.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

ggsql's bundled DuckDB starts with no extensions loaded. DuckDB's own documentation treats ICU as effectively built in: the timestamptz functions page says "Time zone support is provided by the built-in ICU extension", and the timestamp types page notes that INSTALL/LOAD "are only required if the DuckDB client does not bundle the ICU extension". The CLI and Python client do bundle it. So SQL written against the docs can fail on ggsql's engine with a binder error.

Concrete example, from downstream testing in querychat (LLM-generated SQL executed on the bundled engine):

SELECT TIMESTAMPTZ '2026-10-14 05:00:00+00' - INTERVAL 1 MONTH;
-- Binder Error: No function matches the given name and argument types
-- '-(TIMESTAMP WITH TIME ZONE, INTERVAL)'.

The same statement works out of the box in duckdb-python. Mechanism, as verified on bundled v1.5.2: duckdb_extensions() shows icu as neither installed nor loaded; after INSTALL icu; LOAD icu the query succeeds.

Besides timestamptz arithmetic, ICU provides time zone support (AT TIME ZONE, tz-aware casts and comparisons) and locale-aware collations.

Trade-offs, so this is a "please consider" rather than a "please do":

  • INSTALL downloads the extension (network on first use); ggsql already LOADs but never INSTALLs spatial, presumably for that reason.
  • Loading ICU makes timestamptz semantics depend on the local TimeZone setting, so the same SQL can return different results on different machines.
  • Statically linking ICU (the Python/CLI approach) costs binary size and compile time.

Possible directions: statically link ICU in the bundled build; LOAD icu on connection open when already installed; enable autoload_known_extensions; or document that the bundled engine starts extension-free and leave loading to embedders. querychat now does the last of these itself (it loads ICU and spatial on the cache connection at startup), so this isn't blocking us.

Linguagem predominante
Rust
Estrelas
573
Forks
32
Merge médio
8d 23h
PRs com merge (30d)
5

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de posit-dev/ggsql

Todas as issues de posit-dev/ggsql

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.