ADBDEV-10570: Fix broken assertion for Clickhouse connector - #59
Open
riogor wants to merge 1 commit into
Open
Conversation
dkovalev1
reviewed
Aug 12, 2026
| if (fdw_private != NULL) | ||
| if (IsExtCommitMetadata(options) && fdw_private != NULL) | ||
| { | ||
| Assert(list_length(fdw_private) == 1); |
Collaborator
There was a problem hiding this comment.
I would also add Assert(IsIntegerList(fdw_private));
Collaborator
Author
There was a problem hiding this comment.
Is assert in list_nth_int not enough?
Collaborator
There was a problem hiding this comment.
Its not in our code, and error is bit tricky and require stack analyze to get the reason. Here we would get an assert message related to this line and its much easier to track it down that the problem in fdw_private.
Collaborator
Author
There was a problem hiding this comment.
IsIntegerList macro exists only in list.c and is not available outside. Copying macro code doesn't look good either.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An assertion, checking for fdw_private being integer list to get metadata queue id
fails if fdw_private is not an integer list.
This happens when used with FDW that doesn't support metadata queue mechanism.
PXF doesn't check for metadata support at queue id retrieval phase.
Patch covers queue id retrieval with check for FDW metadata support.
No tests because a possible test sends a malformed fdw_private, which
means that connector was done incorrectly, while pxf assumes otherwise.
Ticket: ADBDEV-10570
Co-authored-by: Denis Kovalev d.kovalev@arenadata.io