Skip to content

feat(isthmus): observe scalar function types#1015

Open
alexandrefimov wants to merge 1 commit into
substrait-io:mainfrom
alexandrefimov:issue-379-scalar-type-observer
Open

feat(isthmus): observe scalar function types#1015
alexandrefimov wants to merge 1 commit into
substrait-io:mainfrom
alexandrefimov:issue-379-scalar-type-observer

Conversation

@alexandrefimov

Copy link
Copy Markdown

Summary

  • add an opt-in type observer for Substrait-to-Calcite scalar function conversion
  • report the source expression, supplied Substrait type, and either the independently inferred Calcite type or the inference failure
  • expose observer configuration through ConverterProvider while keeping the default conversion path unchanged

Related to #379.

Behavior

  • observations are emitted for both matching and differing scalar function types
  • the converted RexNode continues to use the type supplied by Substrait
  • Calcite inference failures are reported without turning an otherwise successful conversion into a failure
  • exceptions thrown by the observer are propagated to the caller
  • variadic CONCAT produces one observation for the complete invocation

This PR intentionally covers scalar functions only. Window functions, field references, and aggregate functions remain separate follow-up work.

Validation

  • ./gradlew build --rerun-tasks
  • focused scalar observation tests covering matches, mismatches, inference failures, nested calls, provider injection, observer exceptions, and variadic CONCAT

Assisted-by: gpt-5.6-sol (OpenAI Codex)

Assisted-by: gpt-5.6-sol (OpenAI Codex)
@CLAassistant

CLAassistant commented Jul 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants