Skip to content

Polars Cross Join does not work with required args. #14585

@cagroleau

Description

@cagroleau

Describe the bug

The left_on and right_on positional arguments are required for all polars join commands, but this does not work for the --cross switch.

How to reproduce

1..3 | polars into-df | polars join --cross (4..6 | polars into-df)
Results in error: nu::parser::missing_positional, Missing required positional argument

If I name the columns and try to use those as left_on and right_on:
1..3 | each {|x| {x: $x}} | polars into-df | polars join --cross (4..6 | each {|y| {y: $y}} | polars into-df) x y
Results in error: a 'cross' join doesn't expect any join key

Expected behavior

Positional arguments should not be required when using the --cross switch on a polars join command.

Configuration

key value
version 0.100.0
major 0
minor 100
patch 0
branch
commit_hash
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.82.0 (f6e511eec 2024-10-15) (built from a source tarball)
cargo_version cargo 1.82.0 (8f40fc59f 2024-08-21)
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash
installed_plugins emoji 0.9.0, polars 0.100.0, query 0.100.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:plugin-polarsWork related to the polars dataframe implementationstatus:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions