dolthub / dolthub/dolt

Dolt `GROUP_CONCAT(BIT)` concatenates numeric text instead of BIT bytes.

Open
#11,422 0 comments 0 reactions 0 assignees View on GitHub
bug correctness customer issue good repro sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 8h
Merged PRs (30d)
120

Description

## What happened

Dolt converts `BIT` values to numeric text before concatenating them. MySQL
concatenates the binary string bytes.

## Environment

Dolt main at commit `a995f245c032bc412aed308194d81ee12bc74f6b0a1fae5fd40e0d`
(`dolt version 2.2.3`).

## How to reproduce

```sql
CREATE TABLE t(id INT PRIMARY KEY, v BIT(4));

INSERT INTO t VALUES
(1,b'0011'),
(2,b'0101');

SELECT
HEX(GROUP_CONCAT(v ORDER BY id SEPARATOR '')) AS hex_bits,
GROUP_CONCAT(v+0 ORDER BY id) AS numeric_control
FROM t;
```

## Expected result

MySQL returns:

```text
hex_bits numeric_control
0305 3,5
```

## Actual result

Dolt returns:

```text
hex_bits numeric_control
3335 3,5
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided SQL reproduction against Dolt and compare its GROUP_CONCAT(BIT) output with MySQL. Trace the GROUP_CONCAT handling for BIT values; done means hex_bits is 0305 while numeric_control remains 3,5.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.