databendlabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.87k stars 751 forks source link

fix(query): fix distinct set-returning function #16883

Closed b41sh closed 1 day ago

b41sh commented 1 day ago

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

fix distinct set-returning function

for example

root@0.0.0.0:48000/default> select distinct unnest(split(coalesce(NULL, 'a,b,a,b,c'), ',')) as c1;
┌──────────────────┐
│        c1        │
│ Nullable(String) │
├──────────────────┤
│ a                │
│ b                │
│ c                │
└──────────────────┘
3 rows read in 0.117 sec. Processed 1 rows, 1 B (8.55 rows/s, 8 B/s)

Tests

Type of change


This change is Reviewable