fix(testing): Check both type and data for GenericLiteral in verifier#27108
Merged
hantangwangd merged 1 commit intoprestodb:masterfrom Feb 11, 2026
Merged
Conversation
Contributor
Reviewer's GuideAlign RowExpressionVerifier’s GenericLiteral handling with core constant expression equality semantics by adding a type check alongside value comparison and updating/adding planner tests to use explicitly typed literals (including NaN/Infinity and bigint/integer cases). File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
7 tasks
0ac358e to
a8dcbff
Compare
tdcmeehan
approved these changes
Feb 11, 2026
This was referenced Mar 31, 2026
15 tasks
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
Currently, when
UnaliasSymbolReferencesperforms mapping and canonicalization to compare expression equality, it validates both the type and value for aConstantExpression. However, in test framework,RowExpressionVerifierdoes not check the type when verifying if an expression equals aGenericLiteral—it validates only the value. This inconsistency can cause issues, as demonstrated by the following test case:The test fails with the exception:
This PR fixes the issue by ensuring
RowExpressionVerifierchecks both the type and data for aGenericLiteral, aligning its equality validation with the behavior in the core path.Motivation and Context
Fix the issues caused by inconsistency in constant expression equality checking between the test framework and the core path.
Impact
N/A
Test Plan
Newly added test cases in
TestLogicalPlannerto verify the scenario in the PR descriptionContributor checklist
Release Notes
Summary by Sourcery
Align expression verification for generic literals with planner behavior and add coverage for NaN/Infinity and integer/bigint constants.
Bug Fixes:
Tests: