Skip to content

[CALCITE-7457] VALUES and SELECT produce different validation results for the same expression#4858

Open
dssysolyatin wants to merge 1 commit intoapache:mainfrom
dssysolyatin:fix-top-level-values-validation
Open

[CALCITE-7457] VALUES and SELECT produce different validation results for the same expression#4858
dssysolyatin wants to merge 1 commit intoapache:mainfrom
dssysolyatin:fix-top-level-values-validation

Conversation

@dssysolyatin
Copy link
Copy Markdown
Contributor

@dssysolyatin dssysolyatin commented Apr 1, 2026

Jira Link

CALCITE-7457

Changes Proposed

  • VALUES now routes through validateQuery, triggering TableConstructorNamespace.validateImpl validation (which calls validateValues and inferUnknownTypes). The fix is a validateCall override in SqlValuesOperator.
  • inferUnknownTypes no longer descends into subqueries (node.isA(SqlKind.QUERY)). Each query handles its own inferUnknownTypes during its own validation.
  • Added additional tests inside existing tests which can be dropped. Just to show that now SELECT and VALUES behaves the same way

@dssysolyatin dssysolyatin marked this pull request as ready for review April 1, 2026 09:01
@dssysolyatin dssysolyatin changed the title [CALCITE-7457] Top-level VALUES and SELECT produce different validation results for the same expression [CALCITE-7457] VALUES and SELECT produce different validation results for the same expression Apr 1, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

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