Skip to content

BUG: stats reports wrong max_length when string looks like a date #3855

@hanne

Description

@hanne

When running
qsvp.exe stats --infer-dates --output sample_date_stats.csv sample_date.csv
on the attached data (see below), the column date2 is reported as being type String with max_length 2. I was expecting length 10, because of the value "2026-05-13" (other stats, such as sum_length and avg_length, are also inaccurate). If I run the same command without --infer-dates, I get max_length 10 as expected.

The row with ID 2 contains "NA" for date2, so I expect the column to be String type, despite the name. But I believe the max_length for a String should reflect all rows, also those that look like dates.

Sample Data
ID,txt,date1,date2
1,abc,2026-05-12,2026-05-13
2,def,2026-05-11,NA

Desktop

  • OS: Windows 10

qsvp.exe --version is:
qsv 20.0.0-standard-apply;fetch;foreach;geocode;Luau 0.716;prompt;to;polars-0.53.0:py-1.40.1:1e9a63b;self_update-4-4;6.37 GiB-2.56 GiB-1.53 GiB-7.96 GiB (x86_64-pc-windows-msvc compiled with Rust 1.95;Windows 10 Enterprise-Windows OS Build 19045;Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz-4) prebuilt

Metadata

Metadata

Assignees

Labels

WIPwork in progressbugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions