Skip to content

Remove wrong assertion in interpolate lookup - #10399

Open
JoongHyuk-Shin wants to merge 1 commit into
timescale:mainfrom
JoongHyuk-Shin:fix/gapfill-interpolate-composite-assert
Open

Remove wrong assertion in interpolate lookup#10399
JoongHyuk-Shin wants to merge 1 commit into
timescale:mainfrom
JoongHyuk-Shin:fix/gapfill-interpolate-composite-assert

Conversation

@JoongHyuk-Shin

Copy link
Copy Markdown
Contributor

interpolate() declares its prev and next parameters as RECORD, which accepts any composite value, including one of a named composite type. The lookup path asserted that the fetched sample always carries the anonymous RECORD type id, so passing a named composite aborts the backend in assertion-enabled builds.

The assertion contradicts the call it precedes: the type id and typmod are passed to lookup_rowtype_tupdesc(), which resolves named composite types as well, and the element types are validated right afterwards. The same pattern is used without an assertion in compression.c.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

@svenklemm, @melihmutlu: please review this pull request.

Powered by pull-review

interpolate() declares its prev and next parameters as RECORD, which
accepts any composite value, including one of a named composite type.
The lookup path asserted that the fetched sample always carries the
anonymous RECORD type id, so passing a named composite aborts the
backend in assertion-enabled builds.

The assertion contradicts the call it precedes: the type id and typmod
are passed to lookup_rowtype_tupdesc(), which resolves named composite
types as well, and the element types are validated right afterwards.
The same pattern is used without an assertion in compression.c.
@JoongHyuk-Shin
JoongHyuk-Shin force-pushed the fix/gapfill-interpolate-composite-assert branch from a35a715 to 8ef8e46 Compare August 4, 2026 01:34
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