Skip to content

tp: assert that a column is of a given type - #7167

Draft
LalitMaganti wants to merge 1 commit into
dev/lalitm/exec-tree-foldfrom
dev/lalitm/exec-assert-column-type
Draft

tp: assert that a column is of a given type#7167
LalitMaganti wants to merge 1 commit into
dev/lalitm/exec-tree-foldfrom
dev/lalitm/exec-assert-column-type

Conversation

@LalitMaganti

@LalitMaganti LalitMaganti commented Aug 21, 2026

Copy link
Copy Markdown
Member

A column whose values carry their own type has to become a single type
before anything typed can read it, and that claim needs checking rather
than assuming.

AssertType is where that happens. It checks every row against the type
asked for and returns a flat column, widening a narrower integer where
the conversion is exact and converting nothing else.

It belongs here rather than in the source because a source cannot know
what a column is for, and the operator which does is not the one
reading it.

@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from 62f4dcd to 0ff9bcb Compare August 21, 2026 13:34
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from 0ff9bcb to 2f056ac Compare August 21, 2026 13:43
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from 2f056ac to 98d4d5e Compare August 21, 2026 13:53
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from 98d4d5e to 2298a36 Compare August 21, 2026 14:23
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from 2298a36 to a22a502 Compare August 21, 2026 15:12
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from a22a502 to c6f181b Compare August 21, 2026 15:21
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from c6f181b to 129d977 Compare August 21, 2026 15:33
A column whose values carry their own type has to become a single type
before anything typed can read it, and that claim needs checking rather
than assuming.

AssertType is where that happens. It checks every row against the type
asked for and returns a flat column, widening a narrower integer where
the conversion is exact and converting nothing else.

It belongs here rather than in the source because a source cannot know
what a column is for, and the operator which does is not the one
reading it.
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/exec-assert-column-type branch from 129d977 to 0b6d57b Compare August 21, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant