#23059·OpenSearch

[BUG][Sandbox] dc() over a multi_value keyword fails: approx_distinct not implemented for List

Author: linuxpiCreated Sep 17, 2026Updated Sep 17, 2026
Labelsbuguntriaged

Describe the bug stats dc(tags) over a multi_value: true keyword field returns HTTP 500. Data-node fragment error:

Execution error: This feature is not implemented: Support for 'approx_distinct' for data type List(Utf8View, field: 'element') is not implemented

The LIST column is handed to DataFusion's approx_distinct unexpanded; it should be counted over the flattened elements (or rejected up front with a 400 rather than a 500).

To Reproduce Composite parquet index with tags: {type: keyword, multi_value: true}; run source = idx | stats dc(tags) as distinct_tags. Reproduced by MultiValueAggregationIT in sandbox/qa/analytics-engine-rest (test @AwaitsFix on this issue).

Expected behavior Number of distinct elements across all documents (5 for the fixture: blue, red, green and two unicode values).

Source: opensearch-project/OpenSearch