Skip to content

Incorrect equality comparison for BIT type #11211

@soerenwolfers

Description

@soerenwolfers

What happens?

BIT equality comparison is broken (or at least inconsistent, in case I'm missing something).
Originally posted by @orzom411 in #10720

To Reproduce

FROM
(
  SELECT 
  ( 2::bit & 2::bit ) AS a, 
  2::bit AS b, 
  (a = b) AS '(a = b)',
)
SELECT a, b, a = b, "(a = b)";
┌──────────────────────────────────┬──────────────────────────────────┬─────────┬─────────┐
│                a                 │                b                 │ (a = b) │ (a = b) │
│               bit                │               bit                │ boolean │ boolean │
├──────────────────────────────────┼──────────────────────────────────┼─────────┼─────────┤
│ 00000000000000000000000000000010 │ 00000000000000000000000000000010 │ true    │ false   │
└──────────────────────────────────┴──────────────────────────────────┴─────────┴─────────┘

OS:

Linux

DuckDB Version:

0.10.1-dev717

DuckDB Client:

Python

Full Name:

Soeren Wolfers

Affiliation:

G-Research

Have you tried this on the latest nightly build?

I have tested with a nightly build

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

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions