apache / apache/datafusion-sqlparser-rs

Why ast must implement PartialOrd/Ord?

Open
#1,365 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

I'm working on adding `with` clause support for create index stmt https://www.postgresql.org/docs/current/sql-createindex.html. I plan to use `HashMap` to store `with` content, but failed to compile as `HashMap` doesn't implement PartialOrd/Ord. I'm curious why ast must implement PartialOrd/Ord?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the AST definitions and the trait requirements that affect adding CREATE INDEX WITH content. Compare the intended HashMap representation with the existing AST ordering behavior and determine whether the feature needs a different representation or a documented rationale. Done means the design question is resolved and the CREATE INDEX WITH support can be implemented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.