nushell/crates/nu_plugin_polars
Jack Wright f975c9923a
Handle relative paths correctly on polars to-(parquet|jsonl|arrow|etc) commands (#12486)
# Description

All polars commands that output a file were not handling relative paths
correctly.

A command like
``` [[a b]; [6 2] [1 4] [4 1]] | polars into-df | polars to-parquet foo.json``` 
was outputting the foo.json to the directory of the plugin executable. 

This pull request pulls in nu-path and using it for resolving the file paths.

Related discussion
https://discord.com/channels/601130461678272522/1227612017171501136/1227889870358183966

# User-Facing Changes
None

# Tests + Formatting
Done, added tests for each of the polars to-* commands.

---------

Co-authored-by: Jack Wright <jack.wright@disqo.com>
2024-04-12 19:30:37 -05:00
..
src Handle relative paths correctly on polars to-(parquet|jsonl|arrow|etc) commands (#12486) 2024-04-12 19:30:37 -05:00
Cargo.toml Handle relative paths correctly on polars to-(parquet|jsonl|arrow|etc) commands (#12486) 2024-04-12 19:30:37 -05:00
LICENSE Move dataframes support to a plugin (#12220) 2024-04-09 19:31:43 -05:00