dolthub / dolthub/dolt

`SetOp` and `EmptyTable` should not implement `TableIdNode`

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

Description

A `SetOp` node's exec indexes are assigned based on its left child node rather than the columns set in `ColSet` (see dolthub/go-mysql-server#3110)

The `TableIdNode` functions implemented for `EmptyTable` seem to only be used for testing purposes and `cols` is never actually set. As a result, no ColumnId's are added during `columnIdsForNode`, causing an offset when assigning column indexes (see #10434)

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue points to SetOp, EmptyTable, TableIdNode, and columnIdsForNode; begin by tracing how those nodes contribute column IDs and how SetOp assigns exec indexes. Confirm the behavior described in #10434 and dolthub/go-mysql-server#3110, then add focused regression coverage showing correct offsets and no unintended TableIdNode behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.