Skip to content

feat(isthmus): observe window function return types - #1059

Open
alexandrefimov wants to merge 2 commits into
substrait-io:mainfrom
alexandrefimov:issue-379-window-type-observer
Open

feat(isthmus): observe window function return types#1059
alexandrefimov wants to merge 2 commits into
substrait-io:mainfrom
alexandrefimov:issue-379-window-type-observer

Conversation

@alexandrefimov

Copy link
Copy Markdown
Contributor

Summary

  • report Calcite-inferred return types through TypeObserver during window-function conversion
  • preserve the Substrait-supplied return type and skip extra inference for TypeObserver.NOOP
  • allow callers to configure the observer through ConverterProvider.Builder

Motivation

Scalar-function type observation was introduced in #1015. Issue #379 also identifies window functions as a conversion point where Substrait-supplied and Calcite-inferred types can diverge. This change extends the same observation side channel to window functions and makes it available without subclassing ConverterProvider.

Validation

  • ./gradlew :isthmus:spotlessCheck :isthmus:test --tests 'io.substrait.isthmus.ConverterProviderBuilderTest' --tests 'io.substrait.isthmus.SubstraitExpressionConverterTest' :isthmus:javadoc
  • ./gradlew build --rerun-tasks

Related to #379.

Report Calcite-inferred window return types through the existing observer while preserving the Substrait-supplied RexOver type. Keep the NOOP fast path and convert inference failures into observations.
Allow callers to install a type observer without subclassing ConverterProvider.
@alexandrefimov
alexandrefimov force-pushed the issue-379-window-type-observer branch from 3f70f98 to fa97d02 Compare August 4, 2026 03:32
@alexandrefimov
alexandrefimov marked this pull request as ready for review August 4, 2026 03:41
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