qsv icon indicating copy to clipboard operation
qsv copied to clipboard

`stats`: make `--infer-boolean` configurable

Open jqnatividad opened this issue 5 months ago • 0 comments

Currently, booleans are inferred when --infer-boolean is enabled. The heuristic for inferring booleans is as follows:

  • When a column's cardinality is 2, and;
  • the 2 values' first characters are 0/1, t/f & y/n case-insensitive

Make it so the the first character heuristic is configurable, as t/f (True/False) and y/n (Yes/No) are English-centric.

Further, allow the user to specify more than just the first character, to eliminate false positives (e.g. A column whose cardinality is 2, and a domain of "Tom", "Frank" will be incorrectly inferred as boolean).

jqnatividad avatar Sep 17 '24 15:09 jqnatividad