Skip to content

--float-precision Not Being Considered in qsv sqlp #2641

@brian-mendicino

Description

@brian-mendicino

Describe the bug
The --float-precision option in the qsv sqlp command does not appear to be applied when converting CSV files to Parquet format. Despite specifying a precision value (e.g., 16), the resulting Parquet file always uses the default precision of 6, leading to truncated decimal values.

To Reproduce

  1. Run the following command:
    qsv sqlp /tmp/table.csv 'select * from table' --float-precision 16 --infer-len 0 --format parquet --output table.parquet
  2. Inspect the resulting table.parquet file.
  3. Observe that decimal values are truncated to 6 decimal places, regardless of the --float-precision value.

Expected behavior
The --float-precision option should ensure that floating-point numbers in the Parquet file retain the specified precision (e.g., 16 decimal places).

Screenshots/Backtrace/Sample Data
If applicable, add screenshots/backtraces/sample data to help explain your problem.

Desktop (please complete the following information):

  • OS: Debian GNU/Linux 12
  • qsv Version 3.1.1-mimalloc-polars-0.46.0

Additional Notes
Ideally there would be an option to retain precision, skipping truncation...


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions