apache / apache/arrow-rs

Make Interval Parsing More Permissive

Closed Beginner friendly
#6,390 9 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
3.6k
Forks
1.3k
Avg merge
2d 14h
Merged PRs (30d)
167

Description

**Describe the bug**

While working on https://github.com/apache/datafusion/pull/12448 I noticed that the string `5 day hour` is not interpreted correctly by `parse_interval_month_day_nano_config`, it should be considered the same as `5 day 0 hour`, instead it return an error.

**To Reproduce**

run that function, or look at https://github.com/apache/datafusion/pull/12448

**Expected behavior**

`parse_interval_month_day_nano_config` should match postgres behaviour in general

**Additional context**

Related to #6211 where I improved interval parsing a lot, although apparently not enough.

Contributor guide

Open the contributing guide

Research direction

Start at the parse_interval_month_day_nano_config entry point and reproduce the `5 day hour` case described in the issue, using PR #12448 and related issue #6211 for context. Compare the result with the stated PostgreSQL behavior; done means `5 day hour` is accepted as equivalent to `5 day 0 hour` and interval parsing remains correct for existing cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.