apache / apache/datafusion

`COLLATION` Support

Open
#9,192 10 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

"Collation" generically means how to compare and sort string values.

Soem databases, most notably Postgres, allow you to change the default collation order to control this more carefully to match whatever the user wants rather than what the standard sort order means

Someone asked about this on discord: https://discord.com/channels/885562378132000778/1166447479609376850/1205554368292855868

Here are some details on how this works in Postgres: https://www.postgresql.org/docs/current/collation.html

### Describe the solution you'd like

Someone to design and implement `COLLATION`

This probably looks like a `SessionConfig` setting to control collation at the session level and possibly some way to define it as part of the table definition

### Describe alternatives you've considered

_No response_

### Additional context

This would likely require adding collation support to arrow-rs as well, though I am not 100% sure

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Start by locating SessionConfig and table-definition handling, then review how DataFusion and arrow-rs represent string comparison and sorting. Done means COLLATION is designed and implemented at the required session or table scope, with behavior validated against the PostgreSQL collation requirements described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.