mirror of
https://github.com/nushell/nushell
synced 2024-11-10 15:14:14 +00:00
Only mark collected dataframes as from_lazy=false when collect is called from the collect command. (#12571)
I had previously changed NuLazyFrame::collect to set the NuDataFrame's from_lazy field to false to prevent conversion back to a lazy frame. It appears there are cases where this should happen. Instead, I am only setting from_lazy=false inside the `polars collect` command. [Related discord message](https://discord.com/channels/601130461678272522/1227612017171501136/1230600465159421993) Co-authored-by: Jack Wright <jack.wright@disqo.com>
This commit is contained in:
parent
9a265847e2
commit
cc7b5c5a26
2 changed files with 4 additions and 2 deletions
|
@ -64,7 +64,9 @@ impl PluginCommand for LazyCollect {
|
|||
let value = input.into_value(call.head);
|
||||
match PolarsPluginObject::try_from_value(plugin, &value)? {
|
||||
PolarsPluginObject::NuLazyFrame(lazy) => {
|
||||
let eager = lazy.collect(call.head)?;
|
||||
let mut eager = lazy.collect(call.head)?;
|
||||
// We don't want this converted back to a lazy frame
|
||||
eager.from_lazy = true;
|
||||
Ok(PipelineData::Value(
|
||||
eager
|
||||
.cache(plugin, engine, call.head)?
|
||||
|
|
|
@ -64,7 +64,7 @@ impl NuLazyFrame {
|
|||
help: None,
|
||||
inner: vec![],
|
||||
})
|
||||
.map(|df| NuDataFrame::new(false, df))
|
||||
.map(|df| NuDataFrame::new(true, df))
|
||||
}
|
||||
|
||||
pub fn apply_with_expr<F>(self, expr: NuExpression, f: F) -> Self
|
||||
|
|
Loading…
Reference in a new issue