core: Fix various gencol affinity test failures#6596
Open
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
LeMikaelF
commented
Apr 29, 2026
| })?; | ||
| if column.affinity() != Affinity::Blob { | ||
| program.emit_column_affinity(target_reg, column.affinity()); | ||
| resolver.with_self_table_context(program, Some(&ctx), |program, _| { |
Collaborator
Author
There was a problem hiding this comment.
I moved with_self_table_context out of the loop to do the work only once.
LeMikaelF
commented
Apr 29, 2026
| } expect { | ||
| } | ||
|
|
||
| @requires custom_types "uses custom types" |
Collaborator
Author
There was a problem hiding this comment.
this fixes a related panic that I found while working on this
cab4f97 to
4681222
Compare
SELF_TABLE type lookup only handled DML scopes, so selecting a virtual generated column that called union_tag emitted an empty tag-name table and panicked. Resolve the declared type through SelfTableScope for both DML and SELECT scopes.
4681222 to
2221a90
Compare
sivukhin
approved these changes
Apr 29, 2026
| column.affinity_with_strict(table.is_strict) | ||
| }; | ||
| if !column.is_rowid_alias() { | ||
| continue; |
| } | ||
|
|
||
| if let Some(&rowid_register) = registers.last() { | ||
| resolver |
Collaborator
There was a problem hiding this comment.
can we assert that this is rowid?
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.
Description
Correctly handle missing affinity cases
self_tablemachinery fromProgramBuildertoResolverSelfTableScopetype to group self_table thingsself_table_column_affinitiessince it was now unusedDescription of AI Usage
Codex