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

eq operator doesn't work on binary data #3117

Closed
ozgrakkurt opened this issue Aug 12, 2022 · 2 comments · Fixed by #3124
Closed

eq operator doesn't work on binary data #3117

ozgrakkurt opened this issue Aug 12, 2022 · 2 comments · Fixed by #3124
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ozgrakkurt
Copy link
Contributor

Hello,

I am trying to use datafusion to query multiple parquet files.

Comparing a binary column with binary literal using eq operator doesn't work.

I expect this to just work since eq works on strings.

I have this code:

let address = prefix_hex::decode::<Vec<u8>>(&self.address).map_err(Error::InvalidHexInAddress)?;
let mut expr = col("log.address").eq(lit(address));

and I get this error:

failed to execute query:\nArrow error: External error: Arrow error: External error: Execution error: Arrow error: External error: Arrow error: External error: Execution error: Arrow error: External error:
Internal error: Data type Binary(\"161,250,161,19,203,229,52,54,223,40,255,10,238,84,39,92,19,180,9,117\") not supported for scalar operation 'eq' on dyn array.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker

I tracked the error message to here

Shouldn't there be a match arm for Binary data?

@ozgrakkurt ozgrakkurt added the bug Something isn't working label Aug 12, 2022
@alamb alamb added the good first issue Good for newcomers label Aug 13, 2022
@alamb
Copy link
Contributor

alamb commented Aug 13, 2022

Thanks for the report @ozgrakkurt

Shouldn't there be a match arm for Binary data?

Yes I think you are exactly correct.

If you have time, we would welcome a contribution to fix the issue

@ozgrakkurt
Copy link
Contributor Author

@alamb created #3124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants