dolthub / dolthub/dolt

`dolt_diff()` cannot accept a subquery argument

Open
#11,555 0 comments 0 reactions 0 assignees View on GitHub
diff
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 8h
Merged PRs (30d)
120

Description

Mostly an inconvenience but good to fix.

```sql
SELECT to_id FROM DOLT_DIFF(
(SELECT commit_hash FROM dolt.log ORDER BY date DESC OFFSET 1 LIMIT 1),
(SELECT commit_hash FROM dolt.log ORDER BY date DESC LIMIT 1),
'myTable');

ERROR: attempted to evaluate uninitialized subquery
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided SELECT against dolt_diff() and inspect the implementation or entry point that evaluates its arguments, focusing on why subquery results are reported as uninitialized. Done means both commit_hash subqueries in the reproduction execute successfully and return the expected diff for myTable.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.