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

Can't select by blob field #4612

Closed
2 tasks done
wangfenjin opened this issue Sep 5, 2022 · 4 comments
Closed
2 tasks done

Can't select by blob field #4612

wangfenjin opened this issue Sep 5, 2022 · 4 comments

Comments

@wangfenjin
Copy link
Contributor

What happens?

After insert into table, select by equal seems not work

To Reproduce

D CREATE TABLE blobs (b BYTEA);
D INSERT INTO blobs VALUES('\xaa\xff\xaa'), ('\xAA\xFF\xAA\xAA\xFF\xAA'), ('\xAA\xFF\xAA\xAA\xFF\xAA\xAA\xFF\xAA');
D SELECT * FROM blobs;
┌──────────────────────────────────────┐
│                  b                   │
├──────────────────────────────────────┤
│ \xAA\xFF\xAA                         │
│ \xAA\xFF\xAA\xAA\xFF\xAA             │
│ \xAA\xFF\xAA\xAA\xFF\xAA\xAA\xFF\xAA │
└──────────────────────────────────────┘
D SELECT * FROM blobs where b = '\xaa\xff\xaa';
D SELECT * FROM blobs where b = '\xAA\xFF\xAA';
D

OS:

macOS

DuckDB Version:

0.5.0

DuckDB Client:

capi

Full Name:

WANG FENJIN

Affiliation:

Personal

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree
@wangfenjin wangfenjin changed the title Select by blob field Can't select by blob field Sep 5, 2022
@wangfenjin
Copy link
Contributor Author

More specially, 0.5.0 release break this test case, I can't figure out how to fix the issue
https://github.com/wangfenjin/duckdb-rs/blob/5b72aa7a2693a214d621c78710a058db31021fa0/src/types/to_sql.rs#L318-L339

@wangfenjin
Copy link
Contributor Author

I tried the 0.4.0 binary, the command line also not work.

But the test code do works for 0.4.0

@lokax
Copy link
Contributor

lokax commented Sep 5, 2022

This problem is caused by changing the '\xAA'(one byte) into ('\', 'x', 'A', 'A')(4 byte) when checking the zonemap. I will try to fix it

@wangfenjin
Copy link
Contributor Author

Thanks!

Not sure we will prepare a hot-fix release for this, or will wait for next version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants