Skip to content

hash_join.rs's create_hashes function panics with float columns with nightly rustc #512

@houqp

Description

@houqp

Describe the bug

passing float arrays to create_hashes results in panics with a message "not implemented" when built with nightly rustc.

To Reproduce

Rustc:

✦ at 11:17:43 ❯ rustc --version
rustc 1.54.0-nightly (b663c0f4f 2021-05-29)

Code:

let random_state = RandomState::with_seeds(0, 0, 0, 0);
let schema = Schema::new(vec![Field::new("c1", DataType::Float32, false)]);
let batch = RecordBatch::try_new(
    Arc::new(schema),
    vec![Arc::new(Float32Array::from(vec![
        0.00005, 0.00002, 0.00003, 0.00001, 0.00004,
    ]))],
)
.unwrap();

let hashes_buff = &mut vec![0; batch.num_rows()];
let hashes = create_hashes(&[batch.columns()[0].clone()], &random_state, hashes_buff)?;

Expected behavior

It should not panic.

Additional context

Upstream issue: tkaitchuck/aHash#93

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions