Skip to content

Fix columns property to handle lazy SegmentIterator from spooled protocol#599

Merged
hashhar merged 1 commit into
trinodb:masterfrom
hashhar:hashhar/fix-columns-lazy
Apr 14, 2026
Merged

Fix columns property to handle lazy SegmentIterator from spooled protocol#599
hashhar merged 1 commit into
trinodb:masterfrom
hashhar:hashhar/fix-columns-lazy

Conversation

@hashhar
Copy link
Copy Markdown
Member

@hashhar hashhar commented Apr 14, 2026

Description

Commit a2a1001 made fetch() return a lazy SegmentIterator for spooled results but did not update the columns property which still used += self.fetch(). This raises TypeError when _result.rows is an itertools.chain object and silently materializes the iterator when _result.rows is a list.

Apply the same isinstance branching already present in execute().

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required.
(x) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@hashhar hashhar requested a review from wendigo April 14, 2026 14:36
Commit a2a1001 made fetch() return a lazy SegmentIterator for spooled
results but did not update the columns property which still used
`+= self.fetch()`. This raises TypeError when _result.rows is an
itertools.chain object and silently materializes the iterator when
_result.rows is a list.

Apply the same isinstance branching already present in execute().
@hashhar hashhar merged commit 9cfaa16 into trinodb:master Apr 14, 2026
12 checks passed
@hashhar hashhar deleted the hashhar/fix-columns-lazy branch April 14, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants