Repository navigation
Conversation
antiguru
added this pull request to stack #38942
September 24, 2026 08:52
antiguru
force-pushed
the
sqlfunc-convert-char
branch
from
September 24, 2026 10:14
398ae5c to
f90b8d5
Compare
antiguru
force-pushed
the
sqlfunc-convert-int16
branch
from
September 24, 2026 10:14
14443d5 to
a0fc9c4
Compare
antiguru
force-pushed
the
sqlfunc-convert-char
branch
from
September 24, 2026 14:29
f90b8d5 to
782b054
Compare
antiguru
force-pushed
the
sqlfunc-convert-int16
branch
from
September 24, 2026 14:29
a0fc9c4 to
6a6e9d9
Compare
antiguru
force-pushed
the
sqlfunc-convert-char
branch
from
September 25, 2026 16:00
782b054 to
52aff8b
Compare
antiguru
force-pushed
the
sqlfunc-convert-int16
branch
from
September 25, 2026 16:00
6a6e9d9 to
4ea08d0
Compare
antiguru
force-pushed
the
sqlfunc-convert-int16
branch
from
October 14, 2026 09:11
4ea08d0 to
e7b8eab
Compare
antiguru
force-pushed
the
sqlfunc-convert-char
branch
from
October 14, 2026 09:11
52aff8b to
a40619c
Compare
`PadChar` reads its `length` field in both the call and the output type, so it takes a `&self` receiver and an `output_type_expr`. The expression collapses to what the hand-written `output_sql_type` returned: it sets nullability from the input, and the macro's tail adds only `propagates_nulls && input_type.nullable`, which the non-nullable `&str` input makes the same term. `introduces_nulls` derives false from the `Char<String>` output. `could_error` stays derived, false for a non-`Result` output, matching an impl that never overrode it. The `Display` impl wrote a fixed string, so `sqlname` reproduces it. Note that the SQL name is `padchar` while the function is `pad_char`, so the `func_name!` entry the macro replaces keeps its own spelling. The registry reports only `sqlfunc_signature` moving, on both the bounded and unbounded samples. No declared property changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antiguru
force-pushed
the
sqlfunc-convert-int16
branch
from
October 14, 2026 15:18
e7b8eab to
7be7836
Compare
antiguru
force-pushed
the
sqlfunc-convert-char
branch
from
October 14, 2026 15:18
a40619c to
72f1ef0
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. |
antiguru
added a commit
that referenced
this pull request
Oct 14, 2026
…ro (#39062) Converts the remaining hand-written scalar functions to `#[sqlfunc]`, one commit per source file or function: the `Cast*ToNumeric` casts (`int16`, `int32`, `int64`, `uint16`, `uint32`, `uint64`, `float32`, `float64`, `jsonb`), `PadChar`, `AdjustNumericScale`, `CastArrayToString`, `CastRangeToString`, and all of `date.rs`, `time.rs`, `map.rs`, `record.rs`, `list.rs`, `timestamp.rs` and `string.rs`. Each commit message accounts for every method the deleted impl overrode. No declared property changes. The registry reports only the macro provenance fields moving. Where a hand-written impl declared a property more conservatively than the body needs, the conversion pins the declared value: `could_error` on `record_get`, and `introduces_nulls`, `could_error` and a nullable output on `map_build_from_record_list`. #39814 corrects both. Supersedes #39079 to #39097, which held one conversion each. Based on #39061. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
PadCharto#[sqlfunc]. It reads itslengthboth when evaluating and when computing the output type, so the function takes&selfand anoutput_type_expr.sqlname = "padchar"keeps the SQL name.The registry reports only
sqlfunc_signaturemoving, on both records. No declared property changed.Based on #39062.
🤖 Generated with Claude Code