We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I query the following BIT value '11011110101011011011111011101111' using arrow, I'm getting an extra leading byte with the value x00.
BIT
'11011110101011011011111011101111'
x00
'11011110101011011011111011101111' is 32 bits and expected to be (\xDE\xAD\xBE\xEF) shown by the following query run from the duckdb CLI:
\xDE\xAD\xBE\xEF
SELECT '11011110101011011011111011101111'::BIT::BLOB;
┌───────────────────────────────────────────────────────────────┐ │ CAST(CAST('11011110101011011011111011101111' AS BIT) AS BLOB) │ │ blob │ ├───────────────────────────────────────────────────────────────┤ │ \xDE\xAD\xBE\xEF │ └───────────────────────────────────────────────────────────────┘
But when running the following code I'm getting a result of 5 bytes:
use duckdb::{params, Connection}; fn main() -> Result<(), Box<dyn std::error::Error>> { let conn = Connection::open_in_memory()?; let mut stmt = conn.prepare("SELECT '11011110101011011011111011101111'::BIT")?; let result = stmt.query_arrow(params![])?; println!("{:?}", result.collect::<Vec<_>>()); Ok(()) }
[RecordBatch { schema: Schema { fields: [Field { name: "CAST('11011110101011011011111011101111' AS BIT)", data_type: Binary, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata: {} }, columns: [BinaryArray [ [0, 222, 173, 190, 239], ]], row_count: 1 }]
The expected result is [222, 173, 190, 239].
[222, 173, 190, 239]
Note
rustc 1.75.0 (82e1608df 2023-12-21) duckdb = "0.10.2"
The text was updated successfully, but these errors were encountered:
Issue still there with duckdb = "1.0.0".
duckdb = "1.0.0"
rustc 1.75.0 (82e1608df 2023-12-21) binary: rustc commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112 commit-date: 2023-12-21 host: x86_64-apple-darwin release: 1.75.0 LLVM version: 17.0.6
Sorry, something went wrong.
No branches or pull requests
When I query the following
BIT
value'11011110101011011011111011101111'
using arrow, I'm getting an extra leading byte with the valuex00
.'11011110101011011011111011101111'
is 32 bits and expected to be (\xDE\xAD\xBE\xEF
) shown by the following query run from the duckdb CLI:But when running the following code I'm getting a result of 5 bytes:
The expected result is
[222, 173, 190, 239]
.Note
rustc 1.75.0 (82e1608df 2023-12-21)
duckdb = "0.10.2"
The text was updated successfully, but these errors were encountered: