Skip to content

sql: post repr types: Rename output_type() to output_sql_type() on all scalar funcs #35219

Merged
ggevay merged 6 commits intoMaterializeInc:mainfrom
mgree:repr-type-canonicalize-xform-rename-output-type
Feb 27, 2026
Merged

sql: post repr types: Rename output_type() to output_sql_type() on all scalar funcs #35219
ggevay merged 6 commits intoMaterializeInc:mainfrom
mgree:repr-type-canonicalize-xform-rename-output-type

Conversation

@mgree
Copy link
Contributor

@mgree mgree commented Feb 25, 2026

Motivation

Cleanup stacked on #35084. Edit: That one is merged.

Description

The various scalar functions compute their SQL output types given SQL input types. This renames functions to clarify and adds a shim that converts repr types up to canonical SQL types and then converts the resulting SQL type back to a repr type.

Verification

All the tests.

@github-actions
Copy link

Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone.

PR title guidelines

  • Use imperative mood: "Fix X" not "Fixed X" or "Fixes X"
  • Be specific: "Fix panic in catalog sync when controller restarts" not "Fix bug" or "Update catalog code"
  • Prefix with area if helpful: compute: , storage: , adapter: , sql:

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

@ggevay ggevay force-pushed the repr-type-canonicalize-xform-rename-output-type branch from cb7e9c7 to 4d0d81f Compare February 26, 2026 14:50
ggevay added a commit that referenced this pull request Feb 26, 2026
… MIR structs (#35084)

This is pushing on the repr types work stream. It's on top of
#35067, and stealing
stuff from #35073.

The "Add soft_panic_or_log! canaries for repr type mismatches" commit
turns some error logs into soft_panics, and the other commits attempt to
make CI not run into any of these panics.

Nightlies:
- https://buildkite.com/materialize/nightly/builds/15255 (stale)
- https://buildkite.com/materialize/nightly/builds/15259 (stale)
- https://buildkite.com/materialize/nightly/builds/15260 (stale)
- https://buildkite.com/materialize/nightly/builds/15296 (stale)
- https://buildkite.com/materialize/nightly/builds/15337 (stale)
- https://buildkite.com/materialize/nightly/builds/15346 (stale)
- https://buildkite.com/materialize/nightly/builds/15350 (stale)
- https://buildkite.com/materialize/nightly/builds/15351 (stale)
- https://buildkite.com/materialize/nightly/builds/15355 (limited to
RQGs + SLTs)
- https://buildkite.com/materialize/nightly/builds/15358 (stale)
- https://buildkite.com/materialize/nightly/builds/15359 (slightly
stale)
- https://buildkite.com/materialize/nightly/builds/15366

Release qualifications:
- https://buildkite.com/materialize/release-qualification/builds/1115
(slightly stale)

#35219 does some
naming/cleanup that we'll keep separate (since it involves touching the
`*Func` macros).

---------

Co-authored-by: Michael Greenberg <michael.greenberg@materialize.com>
@ggevay ggevay force-pushed the repr-type-canonicalize-xform-rename-output-type branch from 4d0d81f to b027da8 Compare February 26, 2026 15:01
@ggevay ggevay marked this pull request as ready for review February 26, 2026 15:03
@ggevay ggevay requested review from a team as code owners February 26, 2026 15:03
@ggevay ggevay requested review from aljoscha and antiguru February 26, 2026 15:03
Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine!

@ggevay ggevay merged commit 703a0c2 into MaterializeInc:main Feb 27, 2026
134 checks passed
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.

3 participants