Repository navigation
Conversation
antiguru
added this pull request to stack #38942
September 24, 2026 08:52
antiguru
force-pushed
the
sqlfunc-convert-uint64
branch
from
September 24, 2026 10:14
8cfca20 to
a80691c
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint32
branch
from
September 24, 2026 10:14
3e58a12 to
6fe62a1
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint64
branch
from
September 24, 2026 14:29
a80691c to
ca25813
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint32
branch
from
September 24, 2026 14:29
6fe62a1 to
c6abffd
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint64
branch
from
September 25, 2026 16:00
ca25813 to
562fba4
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint32
branch
from
September 25, 2026 16:00
c6abffd to
375eff4
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint64
branch
from
October 14, 2026 09:11
562fba4 to
eb1d6ed
Compare
`CastUint64ToNumeric` carries an optional `NumericMaxScale`, so the annotated function takes a `&self` receiver and the macro generates `call` as a method on the existing struct instead of defining a unit struct. The hand-written `Display` wrote the fixed string `uint8_to_numeric` without reading the payload, so `sqlname` reproduces it and the impl is deleted. The macro then generates `FuncName` with `NAME` from the annotated function's name, which is the `"cast_uint64_to_numeric"` the manual `func_name!` entry declared, so that entry is deleted to avoid a duplicate impl. Every method the deleted `EagerUnaryFunc` impl overrode is accounted for: * `call`: the annotated function's body, unchanged. * `output_sql_type`: expressed as `output_type_expr`, which reads `self.0` and the `input_type` binding. The generated tail ORs in `propagates_nulls && input_type.nullable`, and `propagates_nulls` derives to `true` from the non-nullable `u64` input, so the result is the same `nullable(input_type.nullable)` the deleted body returned. * `could_error`: carried across as `self.0.is_some()`. The derived default reads the `Result` output and would widen it to an unconditional `true`. * `inverse`: carried across. * `is_monotone`: carried across. `introduces_nulls` is not overridden: `Result<Numeric, EvalError>` derives `false`, which is what the impl inherited. `propagates_nulls` and `preserves_uniqueness` were not overridden and keep deriving as before. The registry reports only `sqlfunc_signature` moving, on both the unscaled and the scaled `cast_uint64_to_numeric` record. No declared property changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antiguru
force-pushed
the
sqlfunc-convert-uint64
branch
from
October 14, 2026 15:18
eb1d6ed to
92f2198
Compare
antiguru
force-pushed
the
sqlfunc-convert-uint32
branch
from
October 14, 2026 15:18
7bab516 to
84f941e
Compare
antiguru
removed this pull request from stack #38942
October 14, 2026 15:45
Member
Author
|
Folded into #39062, which now carries all twenty file conversions as separate commits, per review feedback to land them as one PR. Posted by Claude Code. |
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.
Converts
CastUint64ToNumericto#[sqlfunc]. It carries an optionalNumericMaxScale, so the function takes&selfand builds its output type in anoutput_type_expr.sqlnamekeeps the SQL nameuint8_to_numeric.could_errorstaysself.0.is_some(), which aResultoutput would otherwise widen totrue.The registry reports only the macro provenance fields moving, on both records. No declared property changed.
Based on #39085.
🤖 Generated with Claude Code