Part of #5.
_handle_chunked_conversion dispatches on the output format with an if/elif and no else (src/daflip/services.py:274-282). When the format matches neither csv nor parquet, the loop drains the entire input reader, writes nothing, creates no file, and returns normally. The CLI then prints "Conversion successful! Output written to " for a file that does not exist.
Reproducer:
daflip convert big.sas7bdat out.parquet.partial --input-chunk-size 1000000
infer_format takes only the final extension (src/daflip/utils.py:35), so this infers the output format as partial. On a 3.8 GB SAS file the command spends 29 seconds reading all 45M rows, discards every chunk, and reports success.
Writing to a temporary name and renaming on completion is a normal way to avoid leaving truncated output behind, which is how I hit this. But the same thing happens for any typo (out.parqet) or unsupported target.
The non-chunked path does not have this problem: _write_dataframe ends in else: raise ValueError(f"Unsupported output format: {output_format}") (services.py:503-504).
Fix: add the matching else: raise ValueError(...) to _handle_chunked_conversion. Better still, validate the output format up front in convert_data so both paths reject it before any input is read, rather than after a full pass over the file.
Part of #5.
_handle_chunked_conversiondispatches on the output format with anif/elifand noelse(src/daflip/services.py:274-282). When the format matches neithercsvnorparquet, the loop drains the entire input reader, writes nothing, creates no file, and returns normally. The CLI then prints "Conversion successful! Output written to " for a file that does not exist.Reproducer:
infer_formattakes only the final extension (src/daflip/utils.py:35), so this infers the output format aspartial. On a 3.8 GB SAS file the command spends 29 seconds reading all 45M rows, discards every chunk, and reports success.Writing to a temporary name and renaming on completion is a normal way to avoid leaving truncated output behind, which is how I hit this. But the same thing happens for any typo (
out.parqet) or unsupported target.The non-chunked path does not have this problem:
_write_dataframeends inelse: raise ValueError(f"Unsupported output format: {output_format}")(services.py:503-504).Fix: add the matching
else: raise ValueError(...)to_handle_chunked_conversion. Better still, validate the output format up front inconvert_dataso both paths reject it before any input is read, rather than after a full pass over the file.