Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct the error message for non-parquet file type and non-python api #15641

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/polars-lazy/src/physical_plan/planner/lp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ pub fn create_physical_plan(
},
SinkType::File { file_type, .. } => {
polars_bail!(InvalidOperation:
"sink_{file_type:?} not yet supported in standard engine. Use 'collect().write_parquet()'"
"sink_{file_type} not yet supported in standard engine. Use 'collect().write_{file_type}()'"
)
},
#[cfg(feature = "cloud")]
SinkType::Cloud { .. } => {
polars_bail!(InvalidOperation: "cloud sink not supported in standard engine.")
polars_bail!(InvalidOperation: "cloud sink not supported in standard engine")
},
},
Union { inputs, options } => {
Expand Down
3 changes: 2 additions & 1 deletion crates/polars-plan/src/logical_plan/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ pub struct FileSinkOptions {
}

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash, strum_macros::Display)]
#[strum(serialize_all = "lowercase")]
pub enum FileType {
#[cfg(feature = "parquet")]
Parquet(ParquetWriteOptions),
Expand Down
Loading